]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r258353: zfs page_busy: fix the boundaries of the cleared range
authoravg <avg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 25 Nov 2013 15:40:20 +0000 (15:40 +0000)
committeravg <avg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 25 Nov 2013 15:40:20 +0000 (15:40 +0000)
commit1e5d181e4bf56c5a0c4c7c774b2736c244e960cb
tree849a944778b61a3be51de72de7088762154b5dc3
parent11421e00cdae831e685d42b81865bcb08db11d23
MFC r258353: zfs page_busy: fix the boundaries of the cleared range

This is a fix for a regression introduced in r246293.

vm_page_clear_dirty expects the range to have DEV_BSIZE aligned
boundaries,
otherwise it extends them.  Thus it can happen that the whole page is
marked clean while actually having some small dirty region(s).
This commit makes the range properly aligned and ensures that only
the clean data is marked as such.

It would interesting to evaluate how much benefit clearing with
DEV_BSIZE
granularity produces.  Perhaps instead we should clear the whole page
when it is completely overwritten and don't bother clearing any bits
if only a portion a page is written.

git-svn-id: svn://svn.freebsd.org/base/stable/8@258556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c