HomeFreeBSD

Perform whole-page page truncation for hole-punching under a range lock

Description

Perform whole-page page truncation for hole-punching under a range lock

As an attempt to perform the page truncation more optimally, the
hole-punching support added in 223df0161fad50f53a8fa5ffeea8cc4f8137d522
truncated performed the operation in two steps: first, sub-page "stubs"
were zeroed under the range lock in zfs_free_range() using the new
zfs_zero_partial_page() function and then the whole pages were truncated
within zfs_freesp(). This left a window of opportunity during which
the full pages could be touched.

This patch closes the window by moving the whole-page truncation into
zfs_free_range() under the range lock.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2733

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Sep 26 2014, 4:40 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 29 2014, 4:22 PM
Parents
rGdcca723acee9: Refer to ZED's scripts as ZEDLETs
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGcb08f063074a: Perform whole-page page truncation for hole-punching under a range lock (authored by Tim Chase <tim@chase2k.com>).Sep 29 2014, 4:22 PM