Date: Wed, 15 Feb 2012 17:09:26 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r231771 - in stable/8/sys: fs/nfsserver nfsserver Message-ID: <201202151709.q1FH9QPC071861@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Wed Feb 15 17:09:26 2012 New Revision: 231771 URL: http://svn.freebsd.org/changeset/base/231771 Log: Partial merge of r218345: Unless "cnt" exceeded MAX_COMMIT_COUNT, nfsrv_commit() and nfsvno_fsync() were incorrectly calling vm_object_page_clean(). They were passing the length of the range rather than the ending offset of the range. Reviewed by: kib Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c stable/8/sys/nfsserver/nfs_serv.c Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Wed Feb 15 16:59:24 2012 (r231770) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Wed Feb 15 17:09:26 2012 (r231771) @@ -1293,7 +1293,8 @@ nfsvno_fsync(struct vnode *vp, u_int64_t if (vp->v_object && (vp->v_object->flags & OBJ_MIGHTBEDIRTY)) { VM_OBJECT_LOCK(vp->v_object); - vm_object_page_clean(vp->v_object, off / PAGE_SIZE, (cnt + PAGE_MASK) / PAGE_SIZE, OBJPC_SYNC); + vm_object_page_clean(vp->v_object, OFF_TO_IDX(off), + OFF_TO_IDX(off + cnt + PAGE_MASK), OBJPC_SYNC); VM_OBJECT_UNLOCK(vp->v_object); } Modified: stable/8/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/8/sys/nfsserver/nfs_serv.c Wed Feb 15 16:59:24 2012 (r231770) +++ stable/8/sys/nfsserver/nfs_serv.c Wed Feb 15 17:09:26 2012 (r231771) @@ -3489,7 +3489,8 @@ nfsrv_commit(struct nfsrv_descript *nfsd if (vp->v_object && (vp->v_object->flags & OBJ_MIGHTBEDIRTY)) { VM_OBJECT_LOCK(vp->v_object); - vm_object_page_clean(vp->v_object, off / PAGE_SIZE, (cnt + PAGE_MASK) / PAGE_SIZE, OBJPC_SYNC); + vm_object_page_clean(vp->v_object, OFF_TO_IDX(off), + OFF_TO_IDX(off + cnt + PAGE_MASK), OBJPC_SYNC); VM_OBJECT_UNLOCK(vp->v_object); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202151709.q1FH9QPC071861>