From 58c34e39bf9daeb2257bec9e7eb430ffd097da09 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 28 Feb 2023 12:49:11 +0300 Subject: [PATCH] LU-16603 protocol: add OBD_BRW_COMPRESSED so the client can hint OST the data is compressed Test-Parameters: trivial Signed-off-by: Alex Zhuravlev Change-Id: I4b721db3ad349d5745ee6698de368d0cb0138954 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50154 Reviewed-by: Artem Blagodarenko Reviewed-by: Andreas Dilger Lustre-change: with short Gerrit URL https://review.whamcloud.com/50154 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50372 Tested-by: jenkins Tested-by: Maloo --- lustre/include/uapi/linux/lustre/lustre_idl.h | 1 + lustre/ptlrpc/wiretest.c | 2 ++ lustre/utils/wirecheck.c | 1 + lustre/utils/wiretest.c | 2 ++ 4 files changed, 6 insertions(+) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 0341291..2c262d8 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -1429,6 +1429,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_BRW_OVER_ALLQUOTA (OBD_BRW_OVER_USRQUOTA | \ OBD_BRW_OVER_GRPQUOTA | \ diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 393d082..63718e3 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -2340,6 +2340,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/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index ce643a8..372ca60 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -1128,6 +1128,7 @@ check_niobuf_remote(void) CHECK_DEFINE_X(OBD_BRW_OVER_PRJQUOTA); CHECK_DEFINE_X(OBD_BRW_RDMA_ONLY); CHECK_DEFINE_X(OBD_BRW_SYS_RESOURCE); + CHECK_DEFINE_X(OBD_BRW_COMPRESSED); } static void diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index a6097a6..926a6da6 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -2375,6 +2375,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", -- 1.8.3.1