svn commit: r186193 - head/sys/dev/md
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Dec 16 20:59:27 UTC 2008
Author: trasz
Date: Tue Dec 16 20:59:27 2008
New Revision: 186193
URL: http://svn.freebsd.org/changeset/base/186193
Log:
Fix forced mdconfig -du. E.g. the following would previously
result in panic:
mdconfig -af blah.img -o force
mount /dev/md0 /mnt
mdconfig -du 0
Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Modified:
head/sys/dev/md/md.c
Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c Tue Dec 16 20:48:38 2008 (r186192)
+++ head/sys/dev/md/md.c Tue Dec 16 20:59:27 2008 (r186193)
@@ -374,8 +374,11 @@ g_md_access(struct g_provider *pp, int r
struct md_s *sc;
sc = pp->geom->softc;
- if (sc == NULL)
+ if (sc == NULL) {
+ if (r <= 0 && w <= 0 && e <= 0)
+ return (0);
return (ENXIO);
+ }
r += pp->acr;
w += pp->acw;
e += pp->ace;
More information about the svn-src-all
mailing list