From owner-svn-src-all@freebsd.org Wed Dec 16 23:06:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 839EEA49504; Wed, 16 Dec 2015 23:06:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EE55C1254; Wed, 16 Dec 2015 23:06:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.15.2/8.15.2) with ESMTPS id tBGN6Xbu043926 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Dec 2015 02:06:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.15.2/8.15.2/Submit) id tBGN6XWR043925; Thu, 17 Dec 2015 02:06:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 17 Dec 2015 02:06:33 +0300 From: Gleb Smirnoff To: Ivan Klymenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r292373 - in head: share/man/man9 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/dev/drm2/i915 sys/dev/drm2/ttm sys/dev/md sys/fs/fuse sys/fs/nfsclient sys/fs/smbfs sys/fs/tmpfs sys... Message-ID: <20151216230633.GE42340@FreeBSD.org> References: <201512162130.tBGLUjPj083575@repo.freebsd.org> <20151217005806.5c6c962c@nonamehost.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="IiVenqGWf+H9Y6IX" Content-Disposition: inline In-Reply-To: <20151217005806.5c6c962c@nonamehost.local> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2015 23:06:36 -0000 --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ivan, can you please test this patch? -- Totus tuus, Glebius. --IiVenqGWf+H9Y6IX Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="zfs_vnops.c.diff" Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 292382) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) @@ -5775,7 +5775,7 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c off_t startoff, endoff; int i, error; vm_pindex_t reqstart, reqend; - int pcount, lsize, reqsize, size; + int lsize, reqsize, size; if (rbehind) *rbehind = 0; @@ -5785,10 +5785,8 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c ZFS_ENTER(zfsvfs); ZFS_VERIFY_ZP(zp); - pcount = OFF_TO_IDX(round_page(count)); - zfs_vmobject_wlock(object); - if (m[pcount - 1]->valid != 0 && --pcount == 0) { + if (m[count - 1]->valid != 0 && --count == 0) { zfs_vmobject_wunlock(object); ZFS_EXIT(zfsvfs); return (zfs_vm_pagerret_ok); @@ -5795,7 +5793,7 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c } object = m[0]->object; - mlast = m[pcount - 1]; + mlast = m[count - 1]; if (IDX_TO_OFF(mlast->pindex) >= object->un_pager.vnp.vnp_size) { @@ -5814,9 +5812,9 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c zfs_vmobject_wunlock(object); error = 0; - for (i = 0; i < pcount; i++) { + for (i = 0; i < count; i++) { size = PAGE_SIZE; - if (i == pcount - 1) + if (i == count - 1) size = lsize; va = zfs_map_page(m[i], &sf); error = dmu_read(os, zp->z_id, IDX_TO_OFF(m[i]->pindex), @@ -5829,7 +5827,7 @@ zfs_getpages(struct vnode *vp, vm_page_t *m, int c } zfs_vmobject_wlock(object); - for (i = 0; i < pcount; i++) + for (i = 0; i < count; i++) m[i]->valid = VM_PAGE_BITS_ALL; zfs_vmobject_wunlock(object); --IiVenqGWf+H9Y6IX--