blob: 8d4ccd5ea44b1cda9bbdfae2c9433c5fb32d65c7 [file] [log] [blame]
From b853ac21b03c48adad0e4c821727654e451bb2bf Mon Sep 17 00:00:00 2001
From: Yuan Yao <yuanyaogoog@chromium.org>
Date: Mon, 30 Oct 2023 07:39:34 +0000
Subject: [PATCH] CHROMIUM: fuse: Reposition FUSE_PASSTHROUGH flag
FUSE_PASSTHROUGH is a fuse INIT request/reply flags introduced by
FROMLIST patches. However, the original patch is not upstream so that
the bit position of FUSE_PASSTHROUGH is not determinded currently. Now
the bit will overlap the with FUSE_CREATE_SUPP_GROUP, which has been
upstreamed.
This commit addresses the conflict by shifting the FUSE_PASSTHROUGH flag
to the unused 63rd bit. This ensures compatibility with future upstream
flags and avoids potential conflicts during future backporting.
UPSTREAM-TASK=b:308385528
BUG=b:308383837
TEST=CQ
Signed-off-by: Yuan Yao <yuanyaogoog@chromium.org>
Change-Id: Ia8130042df779f67aea2d80b5eb53a94cf9edddf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4989216
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Kcr-patch: 8b4915e60e145a6a8fa80b7553f36d458e9d380127f54722c93291a1.patch
---
include/uapi/linux/fuse.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index ff03bf7e4cf77cd890fdf61e8df5213faf12c3d0..043952b46178907e7d46643072b0f9199fdc7c7c 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -447,9 +447,10 @@ struct fuse_file_lock {
#define FUSE_SECURITY_CTX (1ULL << 32)
#define FUSE_HAS_INODE_DAX (1ULL << 33)
#define FUSE_CREATE_SUPP_GROUP (1ULL << 34)
-#define FUSE_PASSTHROUGH (1ULL << 34)
#define FUSE_HAS_EXPIRE_ONLY (1ULL << 35)
#define FUSE_DIRECT_IO_ALLOW_MMAP (1ULL << 36)
+/* to avoid conflicts, non-upstream flags should be in the rightmost bits */
+#define FUSE_PASSTHROUGH (1ULL << 63)
/* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */
#define FUSE_DIRECT_IO_RELAX FUSE_DIRECT_IO_ALLOW_MMAP
--
2.43.0.472.g3155946c3a-goog