svn commit: r186038 - head/sbin/geom/misc
Ulf Lilleengen
lulf at FreeBSD.org
Sat Dec 13 14:14:56 UTC 2008
Author: lulf
Date: Sat Dec 13 14:14:56 2008
New Revision: 186038
URL: http://svn.freebsd.org/changeset/base/186038
Log:
- 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
Modified:
head/sbin/geom/misc/subr.c
Modified: head/sbin/geom/misc/subr.c
==============================================================================
--- head/sbin/geom/misc/subr.c Sat Dec 13 13:07:12 2008 (r186037)
+++ head/sbin/geom/misc/subr.c Sat Dec 13 14:14:56 2008 (r186038)
@@ -211,7 +211,7 @@ g_metadata_store(const char *name, u_cha
sector = NULL;
error = 0;
- fd = open(path, O_WRONLY);
+ fd = open(path, O_RDWR);
if (fd == -1)
return (errno);
mediasize = g_get_mediasize(name);
More information about the svn-src-all
mailing list