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

Commit 155804e9 authored by Shivaprasad Hongal's avatar Shivaprasad Hongal Committed by Gerrit - the friendly Code Review server
Browse files

[ANDROID] 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/


[shongal@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: default avatarShivaprasad Hongal <shongal@codeaurora.org>
parent 49f7d351
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -245,6 +245,13 @@ enum req_flag_bits {

	__REQ_URGENT,		/* urgent request */
	__REQ_NOWAIT,           /* Don't wait if request will block */

	/* Android specific flags */
	__REQ_NOENCRYPT,	/*
				 * ok to not encrypt (already encrypted at fs
				 * level)
				 */

	__REQ_NR_BITS,		/* stops here */
};

@@ -262,6 +269,7 @@ enum req_flag_bits {
#define REQ_PREFLUSH		(1ULL << __REQ_PREFLUSH)
#define REQ_RAHEAD		(1ULL << __REQ_RAHEAD)
#define REQ_BACKGROUND		(1ULL << __REQ_BACKGROUND)
#define REQ_NOENCRYPT		(1ULL << __REQ_NOENCRYPT)

#define REQ_NOUNMAP		(1ULL << __REQ_NOUNMAP)
#define REQ_NOWAIT		(1ULL << __REQ_NOWAIT)