diff mbox series

[05/27] lustre: protocol: add OBD_BRW_COMPRESSED

Message ID 1681739243-29375-6-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to OpenSFS branch April 17, 2023 | expand

Commit Message

James Simmons April 17, 2023, 1:47 p.m. UTC
From: Alex Zhuravlev <bzzz@whamcloud.com>

so the client can hint OST the data is compressed

WC-bug-id: https://jira.whamcloud.com/browse/LU-16603
Lustre-commit: 764e19186cfc99123 ("LU-16603 protocol: add OBD_BRW_COMPRESSED")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50154
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/ptlrpc/wiretest.c            | 2 ++
 include/uapi/linux/lustre/lustre_idl.h | 1 +
 2 files changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/fs/lustre/ptlrpc/wiretest.c b/fs/lustre/ptlrpc/wiretest.c
index 472d155c..6e893f0 100644
--- a/fs/lustre/ptlrpc/wiretest.c
+++ b/fs/lustre/ptlrpc/wiretest.c
@@ -2085,6 +2085,8 @@  void lustre_assert_wire_constants(void)
 		 OBD_BRW_RDMA_ONLY);
 	LASSERTF(OBD_BRW_SYS_RESOURCE == 0x40000, "found 0x%.8x\n",
 		 OBD_BRW_SYS_RESOURCE);
+	LASSERTF(OBD_BRW_COMPRESSED == 0x80000, "found 0x%.8x\n",
+		 OBD_BRW_COMPRESSED);
 
 	/* Checks for struct ost_body */
 	LASSERTF((int)sizeof(struct ost_body) == 208, "found %lld\n",
diff --git a/include/uapi/linux/lustre/lustre_idl.h b/include/uapi/linux/lustre/lustre_idl.h
index c979e24..83c8ea8 100644
--- a/include/uapi/linux/lustre/lustre_idl.h
+++ b/include/uapi/linux/lustre/lustre_idl.h
@@ -1253,6 +1253,7 @@  struct hsm_state_set {
 #define OBD_BRW_ROOT_PRJQUOTA 0x10000 /* check project quota for root */
 #define OBD_BRW_RDMA_ONLY    0x20000 /* RPC contains RDMA-only pages*/
 #define OBD_BRW_SYS_RESOURCE 0x40000 /* page has CAP_SYS_RESOURCE */
+#define OBD_BRW_COMPRESSED   0x80000 /* data compressed on client */
 
 #define OBD_MAX_GRANT 0x7fffffffUL /* Max grant allowed to one client: 2 GiB */