[lustre-devel] [PATCH 19/39] lustre: mdc: avoid easize set to 0
James Simmons
jsimmons at infradead.org
Thu Jan 21 09:16:42 PST 2021
From: Yang Sheng <ys at whamcloud.com>
The cl_default_mds_easize could be set to 0 in some case. Then
check it before package.
Fixes: 05fc96e25b55 ("lustre: osd: Set max ea size to XATTR_SIZE_MAX")
WC-bug-id: https://jira.whamcloud.com/browse/LU-14155
Lustre-commit: ff35e27da4c76b ("LU-14155 mdc: avoid easize set to 0")
Signed-off-by: Yang Sheng <ys at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40785
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Mike Pershin <mpershin at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/mdc/mdc_locks.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/lustre/mdc/mdc_locks.c b/fs/lustre/mdc/mdc_locks.c
index a82e8ca..8bbb9e1 100644
--- a/fs/lustre/mdc/mdc_locks.c
+++ b/fs/lustre/mdc/mdc_locks.c
@@ -554,7 +554,10 @@ static int mdc_save_lovea(struct ptlrpc_request *req, void *data, u32 size)
lit = req_capsule_client_get(&req->rq_pill, &RMF_LDLM_INTENT);
lit->opc = (u64)it->it_op;
- easize = obd->u.cli.cl_default_mds_easize;
+ if (obd->u.cli.cl_default_mds_easize > 0)
+ easize = obd->u.cli.cl_default_mds_easize;
+ else
+ easize = obd->u.cli.cl_max_mds_easize;
/* pack the intended request */
mdc_getattr_pack(req, valid, it->it_flags, op_data, easize);
--
1.8.3.1
More information about the lustre-devel
mailing list