Date: Tue, 16 Dec 2008 20:59:27 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186193 - head/sys/dev/md Message-ID: <200812162059.mBGKxRHE047536@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812162059.mBGKxRHE047536>