From owner-svn-src-head@FreeBSD.ORG Sat Oct 4 08:41:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 432F9663; Sat, 4 Oct 2014 08:41:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27C6E650; Sat, 4 Oct 2014 08:41:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s948fNwm016265; Sat, 4 Oct 2014 08:41:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s948fNVE016264; Sat, 4 Oct 2014 08:41:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410040841.s948fNVE016264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Oct 2014 08:41:23 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 08:41:24 -0000 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: