Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 2014 08:41:23 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272509 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201410040841.s948fNVE016264@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Oct  4 08:41:23 2014
New Revision: 272509
URL: https://svnweb.freebsd.org/changeset/base/272509

Log:
  Diff reduction with upstream.  The code change is not really applicable
  to FreeBSD.
  
  Illumos issue:
      5148 zvol's DKIOCFREE holds zfsdev_state_lock too long
  
  MFC after:	1 month

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Sat Oct  4 08:32:15 2014	(r272508)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Sat Oct  4 08:41:23 2014	(r272509)
@@ -1983,8 +1983,8 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t 
 		 */
 		if (df.df_start >= zv->zv_volsize)
 			break;	/* No need to do anything... */
-		if (df.df_start + df.df_length > zv->zv_volsize)
-			df.df_length = DMU_OBJECT_END;
+
+		mutex_exit(&spa_namespace_lock);
 
 		rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length,
 		    RL_WRITER);
@@ -2023,7 +2023,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t 
 				    dmu_objset_pool(zv->zv_objset), 0);
 			}
 		}
-		break;
+		return (error);
 	}
 
 	default:



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