]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Remove 'discards_supported' from the dm_table structure. The same
authorMike Snitzer <snitzer@redhat.com>
Mon, 25 Jul 2011 00:49:51 +0000 (10:49 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 25 Jul 2011 00:49:51 +0000 (10:49 +1000)
commit0677be80b1eb08b90af8752587cd242ba8551de8
treec60bf6ee593a5d76777fa4130d80ff2e551bb810
parent67cc05b6c89490114e4258bd37e18d740230692d
Remove 'discards_supported' from the dm_table structure.  The same
information can be easily discovered from the table's target(s) in
dm_table_supports_discards().

Before this fix dm_table_supports_discards() would skip checking the
individual targets' 'discards_supported' flag if any one target in the
table didn't set num_discard_requests > 0.  Now the per-target
'discards_supported' flag is effective at insuring the final DM device
advertises discard support.  But, to be clear, targets that don't
support discards (!num_discard_requests) will not receive discard
requests.

Also DMWARN if a target sets 'discards_supported' override but forgets
to set 'num_discard_requests'.

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