]> asedeno.scripts.mit.edu Git - linux.git/commit
rbd: handle DISCARD and WRITE_ZEROES separately
authorIlya Dryomov <idryomov@gmail.com>
Tue, 29 Jan 2019 11:46:25 +0000 (12:46 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 5 Mar 2019 17:55:17 +0000 (18:55 +0100)
commit6484cbe987e0e44b8ebf224fc9faf7f73ace10d2
tree9fe6187380123ff29c4a93a73435f5f4dd012e8b
parentfd7e3f0d8f25e4e3fed9fa3a743af92ebcbaf4e9
rbd: handle DISCARD and WRITE_ZEROES separately

With discard_zeroes_data gone in commit 48920ff2a5a9 ("block: remove
the discard_zeroes_data flag"), continuing to provide this guarantee is
pointless: applications can't query it and discards can only be used
for deallocating.

Add OBJ_OP_ZEROOUT and move the existing logic under it.  As the first
step to divorcing OBJ_OP_DISCARD, stop worrying about copyups but keep
special casing whole-object layered discards.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
drivers/block/rbd.c