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

Commit acbe8f23 authored by Dinesh K Garg's avatar Dinesh K Garg
Browse files

md: Enable cache flush for dm-req-crypt based devices



dm-req-crypt based devices may be capable of cache flushing. DM
layer by default does not enable cache flushing for DM devices.
If underlying device supports flush, mapped target should also
allow it.

Change-Id: Ifbaa02411155cc49076cf3c8087851dc00a877a0
Signed-off-by: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent 8ae65e26
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1265,6 +1265,12 @@ static int req_crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
					_req_dm_scatterlist_pool);
	BUG_ON(!req_scatterlist_pool);

	/*
	 * If underlying device supports flush, mapped target should
	 * also allow it
	 */
	ti->num_flush_bios = 1;

	err = 0;
	DMINFO("%s: Mapping block_device %s to dm-req-crypt ok!\n",
	       __func__, argv[3]);