]> granicus.if.org Git - zfs/commit
Discard on zvols should not exceed the length of a block
authorRichard Yao <ryao@gentoo.org>
Fri, 18 Sep 2015 12:32:52 +0000 (08:32 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 19 Sep 2015 21:00:14 +0000 (14:00 -0700)
commitf52ebcb3eb1630694648237ad6d439c226c3dd99
treef83908c5a2f642ffc4ec1ecb2104784c15139e67
parent7a27ad00ae142b38d4aef8cc0af7a72b4c0e44fe
Discard on zvols should not exceed the length of a block

37f9dac592bf5889c3efb305c48ac39b4c7dd140 replaced the end-start
calculation with a cached value, but neglected to update it on discard
operations. This can cause us to discard data not requested, causing
data loss on zvols.

Reported-by: Richard Connon <richard.connon@zynstra.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3798
module/zfs/zvol.c