From: Alex Zhuravlev Date: Tue, 28 Feb 2023 09:49:11 +0000 (+0300) Subject: LU-16603 protocol: add OBD_BRW_COMPRESSED X-Git-Tag: 2.15.55~64 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F50154%2F5;p=fs%2Flustre-release.git 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: Oleg Drokin Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 080a689..27acb7f 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -1401,6 +1401,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 1f5bec7..5ac8e78 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -2373,6 +2373,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 abb0ed7..1c962b2 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -1106,6 +1106,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_SYS_COMPRESSED); } static void diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index caad564..4f30dc8 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -2399,6 +2399,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",