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

Commit 285e264b authored by Michael Halcrow's avatar Michael Halcrow Committed by Sahitya Tummala
Browse files

block: Add bio req flag to disable encryption in block



When lower layers such as dm-crypt observe the REQ_NOENCRYPT flag, it
helps the I/O stack avoid redundant encryption, improving performance
and power utilization.

Note that lower layers must be consistent in their observation of this
flag in order to avoid the possibility of data corruption.

Change-Id: I4805c3b06b3e765d7362d0b360523813ed77b8aa
Signed-off-by: default avatarMichael Halcrow <mhalcrow@google.com>
Git-repo: https://android.googlesource.com/kernel/common/


Git-commit: a0948fba1f34e8fc2b689d6928283b3f64158923
[stummala@codeaurora.org: resolve merge conflicts]
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent 8ab1a8a4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -188,6 +188,9 @@ enum rq_flag_bits {
	__REQ_FUA,		/* forced unit access */
	__REQ_PREFLUSH,		/* request for cache flush */
	__REQ_BARRIER,		/* marks flush req as barrier */
        /* Android specific flags */
	__REQ_NOENCRYPT,	/* ok to not encrypt (already encrypted at fs
				   level) */

	/* bio only flags */
	__REQ_RAHEAD,		/* read ahead, can fail anytime */
@@ -228,6 +231,7 @@ enum rq_flag_bits {
#define REQ_URGENT		(1ULL << __REQ_URGENT)
#define REQ_NOIDLE		(1ULL << __REQ_NOIDLE)
#define REQ_INTEGRITY		(1ULL << __REQ_INTEGRITY)
#define REQ_NOENCRYPT		(1ULL << __REQ_NOENCRYPT)

#define REQ_FAILFAST_MASK \
	(REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)