Date: Thu, 17 Dec 2015 02:06:33 +0300 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Ivan Klymenko <fidaj@ukr.net> 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> In-Reply-To: <20151217005806.5c6c962c@nonamehost.local> References: <201512162130.tBGLUjPj083575@repo.freebsd.org> <20151217005806.5c6c962c@nonamehost.local>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151216230633.GE42340>