summaryrefslogtreecommitdiffstats
path: root/drivers/parport
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-10-30 20:29:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-31 16:35:32 +0100
commit4e004c31abe30ba592a0eb75d4c9e9a0aa8e53af (patch)
treed27485cc1df9ba0e2ef38ebe094dee81389fea7d /drivers/parport
parentc2c580298f84c96420cbbffef518910bd5e136cd (diff)
downloadlinux-stable-4e004c31abe30ba592a0eb75d4c9e9a0aa8e53af.tar.gz
linux-stable-4e004c31abe30ba592a0eb75d4c9e9a0aa8e53af.tar.bz2
linux-stable-4e004c31abe30ba592a0eb75d4c9e9a0aa8e53af.zip
loop: fix no-unmap write-zeroes request behavior
[ Upstream commit efcfec579f6139528c9e6925eca2bc4a36da65c6 ] 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 <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/parport')
0 files changed, 0 insertions, 0 deletions