Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 2014 19:26:27 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263118 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201403131926.s2DJQRHg049363@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Mar 13 19:26:26 2014
New Revision: 263118
URL: http://svnweb.freebsd.org/changeset/base/263118

Log:
  Report ZVOL block size as GEOM stripesize.
  
  MFC after:	2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Thu Mar 13 19:26:23 2014	(r263117)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Thu Mar 13 19:26:26 2014	(r263118)
@@ -925,12 +925,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403131926.s2DJQRHg049363>