dm: add WRITE SAME support
authorMike Snitzer <snitzer@redhat.com>
Fri, 21 Dec 2012 20:23:37 +0000 (20:23 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 21 Dec 2012 20:23:37 +0000 (20:23 +0000)
commit23508a96cd2e857d57044a2ed7d305f2d9daf441
tree149ead46c45a0fdd159fb32a6bfb6439eae3d652
parentd54eaa5a0fde0a202e4e91f200f818edcef15bee
dm: add WRITE SAME support

WRITE SAME bios have a payload that contain a single page.  When
cloning WRITE SAME bios DM has no need to modify the bi_io_vec
attributes (and doing so would be detrimental).  DM need only alter the
start and end of the WRITE SAME bio accordingly.

Rather than duplicate __clone_and_map_discard, factor out a common
function that is also used by __clone_and_map_write_same.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm.c