aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev
diff options
context:
space:
mode:
authorDarrick J. Wong <[email protected]>2019-10-30 20:29:48 -0700
committerJens Axboe <[email protected]>2019-11-01 08:43:20 -0600
commitefcfec579f6139528c9e6925eca2bc4a36da65c6 (patch)
treefcb52fe28df557856d7d4f78204d8952f85a9693 /net/switchdev
parenta4414aedf4bc923c1faa24d72d14f14c2b93e48f (diff)
loop: fix no-unmap write-zeroes request behavior
Currently, if the loop device receives a WRITE_ZEROES request, it asks the underlying filesystem to punch out the range. This behavior is correct if unmapping is allowed. However, a NOUNMAP request means that the caller doesn't want us to free the storage backing the range, so punching out the range is incorrect behavior. To satisfy a NOUNMAP | WRITE_ZEROES request, loop should ask the underlying filesystem to FALLOC_FL_ZERO_RANGE, which is (according to the fallocate documentation) required to ensure that the entire range is backed by real storage, which suffices for our purposes. Fixes: 19372e2769179dd ("loop: implement REQ_OP_WRITE_ZEROES") Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/switchdev')
0 files changed, 0 insertions, 0 deletions