- When writing metadata to a geom provider, open the it as read-write since it
might do subsequent reads from other providers. This stopped geli (and probably other classes using g_metadata_store as well) from being put on top of gvinum raid5 volumes. Note: The reason it fails in the gvinum raid5 case is that gvinum will read back the old parity stripe before calculating the new parity stripe to be written out again. The write will then fail because the underlying disk to be read is opened write only. MFC after: 1 week
This commit is contained in:
parent
6fe00c7876
commit
a468c003ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186038
@ -211,7 +211,7 @@ g_metadata_store(const char *name, u_char *md, size_t size)
|
||||
sector = NULL;
|
||||
error = 0;
|
||||
|
||||
fd = open(path, O_WRONLY);
|
||||
fd = open(path, O_RDWR);
|
||||
if (fd == -1)
|
||||
return (errno);
|
||||
mediasize = g_get_mediasize(name);
|
||||
|
Loading…
Reference in New Issue
Block a user