target/iblock: pass WRITE_SAME to device if possible
authorMike Christie <mchristi@redhat.com>
Wed, 24 Feb 2016 19:56:33 +0000 (13:56 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 11 Mar 2016 05:48:53 +0000 (21:48 -0800)
commit07b6319687026bdac90a0bb9eeb0509f1ff27179
tree05e7f5b5e9046c813b7d118a5542d83b33240725
parente3416ab2d156ac0f0a3d9e55bcdff69d109ba403
target/iblock: pass WRITE_SAME to device if possible

This patch has iblock pass the WRITE_SAME command to
the device for offloading if possible. It is similar to what is
done for UNMAP/discards, except that we export a large max write same
value to the initiator, and then rely on the block layer to
break it up into multiple requests if it cannot fit into one.

v2.

- Drop file backend changes and move helper function to
iblock backend.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_iblock.c