HomeFreeBSD

Discard on zvols should not exceed the length of a block

Description

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

Details

Provenance
Richard Yao <ryao@gentoo.org>Authored on Sep 18 2015, 12:32 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 19 2015, 9:00 PM
Parents
rG7a27ad00ae14: Tag zfs-0.6.5
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGf52ebcb3eb16: Discard on zvols should not exceed the length of a block (authored by Richard Yao <ryao@gentoo.org>).Sep 19 2015, 9:00 PM