]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/zvol.c
Support secure discard on zvols
authorRichard Yao <ryao@gentoo.org>
Fri, 10 Oct 2014 15:23:23 +0000 (11:23 -0400)
committerRichard Yao <ryao@gentoo.org>
Fri, 4 Sep 2015 19:37:24 +0000 (15:37 -0400)
commitfa56567630cfad95b77dee507595d77f24e99cb9
tree4d7c1c971fff66f18f0715d4a48edcdc26a4dd72
parent37f9dac592bf5889c3efb305c48ac39b4c7dd140
Support secure discard on zvols

Linux 2.6.36 introduced REQ_SECURE to indicate when discards *must* be
processed, such that we cannot do optimizations like block alignment.
Consequently, the discard semantics prior to 2.6.36 require us to always
process unaligned discards. Previously, we would do this optimization
regardless. This patch changes things to correctly restrict this
optimization to situations where REQ_SECURE exists, but is not included
in the flags.

Signed-off-by: Richard Yao <ryao@gentoo.org>
module/zfs/zvol.c