]> git.baikalelectronics.ru Git - kernel.git/commit
dm: linear support discard
authorMike Snitzer <snitzer@redhat.com>
Thu, 12 Aug 2010 03:14:08 +0000 (04:14 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 12 Aug 2010 03:14:08 +0000 (04:14 +0100)
commit11dd8cfac076e4e0e3e2ad96996b6d61185cd541
tree712ddc158309d7ad77e3c19e70f0ae9fafb94446
parentb633fad9b430fb2e5bb0b1f2c9fd9ef8231bacef
dm: linear support discard

Allow discards to be passed through to linear mappings if at least one
underlying device supports it.  Discards will be forwarded only to
devices that support them.

A target that supports discards should set num_discard_requests to
indicate how many times each discard request must be submitted to it.

Verify table's underlying devices support discards prior to setting the
associated DM device as capable of discards (via QUEUE_FLAG_DISCARD).

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-linear.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/md/dm.h
include/linux/device-mapper.h