svn commit: r251931 - stable/9/sys/geom

Alexander Motin mav at FreeBSD.org
Tue Jun 18 09:47:57 UTC 2013


Author: mav
Date: Tue Jun 18 09:47:56 2013
New Revision: 251931
URL: http://svnweb.freebsd.org/changeset/base/251931

Log:
  MFC r251616:
  Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
  disk method call returned error.  GEOM considers devices in such case as
  still closed, and won't call symmetric d_close() for them.

Modified:
  stable/9/sys/geom/geom_disk.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/geom_disk.c
==============================================================================
--- stable/9/sys/geom/geom_disk.c	Tue Jun 18 09:45:10 2013	(r251930)
+++ stable/9/sys/geom/geom_disk.c	Tue Jun 18 09:47:56 2013	(r251931)
@@ -138,6 +138,8 @@ g_disk_access(struct g_provider *pp, int
 				printf("Opened disk %s -> %d\n",
 				    pp->name, error);
 			g_disk_unlock_giant(dp);
+			if (error != 0)
+				return (error);
 		}
 		pp->mediasize = dp->d_mediasize;
 		pp->sectorsize = dp->d_sectorsize;


More information about the svn-src-stable-9 mailing list