md: Enable discard option for dm-req-crypt based devices
dm-req-crypt based devices are capable of supporting discard option. DM layer by default does not enable discard option for DM devices. Since underlying device supports discard option, mapped target should also allow it. Change-Id: Ia540a814c3dcd91f573d1f25d637107a48309a58 Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
This commit is contained in:
parent
566b0758b6
commit
82b3ab0380
1 changed files with 3 additions and 2 deletions
|
@ -1271,10 +1271,11 @@ static int req_crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
|||
BUG_ON(!req_scatterlist_pool);
|
||||
|
||||
/*
|
||||
* If underlying device supports flush, mapped target should
|
||||
* also allow it
|
||||
* If underlying device supports flush/discard, mapped target
|
||||
* should also allow it
|
||||
*/
|
||||
ti->num_flush_bios = 1;
|
||||
ti->num_discard_bios = 1;
|
||||
|
||||
err = 0;
|
||||
DMINFO("%s: Mapping block_device %s to dm-req-crypt ok!\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue