]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r258353: zfs page_busy: fix the boundaries of the cleared range
authoravg <avg@FreeBSD.org>
Mon, 25 Nov 2013 16:31:31 +0000 (16:31 +0000)
committeravg <avg@FreeBSD.org>
Mon, 25 Nov 2013 16:31:31 +0000 (16:31 +0000)
commitdf50cf195b82cc4c361d45e9444306719ea6620e
tree77d391596b68bc90b94a9a3cc73929c875c9dc59
parentb0519089ed0efd8b8d92d24e9d972cfdb513232a
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)
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c