]> CyberLeo.Net >> Repos - FreeBSD/stable/10.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 16:31:31 +0000 (16:31 +0000)
committeravg <avg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 25 Nov 2013 16:31:31 +0000 (16:31 +0000)
commit0d257a518c389db07038181dcd9557e988c75cdc
tree77d391596b68bc90b94a9a3cc73929c875c9dc59
parentbe2c11376d04fa48ea8500a8a3604273f390fb68
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.

Reviewed by: kib
Approved by: re (gjb)

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