Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 721523cc authored by Dinesh K Garg's avatar Dinesh K Garg Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent 9d17b246
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1267,10 +1267,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",