svn commit: r263988 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Alexander Motin mav at FreeBSD.org
Tue Apr 1 12:08:59 UTC 2014


Author: mav
Date: Tue Apr  1 12:08:58 2014
New Revision: 263988
URL: http://svnweb.freebsd.org/changeset/base/263988

Log:
  MFC r263118:
  Report ZVOL block size as GEOM stripesize.

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Tue Apr  1 12:07:15 2014	(r263987)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Tue Apr  1 12:08:58 2014	(r263988)
@@ -931,12 +931,16 @@ zvol_open(struct g_provider *pp, int fla
 		return (SET_ERROR(ENXIO));
 	}
 
-	if (zv->zv_total_opens == 0)
+	if (zv->zv_total_opens == 0) {
 		err = zvol_first_open(zv);
-	if (err) {
-		if (locked)
-			mutex_exit(&spa_namespace_lock);
-		return (err);
+		if (err) {
+			if (locked)
+				mutex_exit(&spa_namespace_lock);
+			return (err);
+		}
+		pp->mediasize = zv->zv_volsize;
+		pp->stripeoffset = 0;
+		pp->stripesize = zv->zv_volblocksize;
 	}
 	if ((flag & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) {
 		err = SET_ERROR(EROFS);


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