freebsd-dev/sys/cddl/contrib/opensolaris
Andriy Gapon 3fd7f7bef7 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.

Reported by:	George Hartzell <hartzell@alerce.com>,
		Richard Todd <rmtodd@servalan.servalan.com>
Tested by:	George Hartzell <hartzell@alerce.com>,
Reviewed by:	kib
MFC after:	5 days
2013-11-19 18:43:47 +00:00
..
common MFV r254750: 2013-09-21 00:17:26 +00:00
uts zfs page_busy: fix the boundaries of the cleared range 2013-11-19 18:43:47 +00:00
OPENSOLARIS.LICENSE