From 8a10e9e03ee59e23400e375effa2f3c9041efbe2 Mon Sep 17 00:00:00 2001 From: Vitaliy Kuznetsov Date: Tue, 7 Mar 2023 17:10:24 +0300 Subject: [PATCH] LU-16549 osp: Fix sizeof for RMF_OUT_UPDATE_HEADER The first struct packed is actually a struct out_update_header with no inline data, so it must be packed in the size of out_update_header struct, but gets packed as length 120 because of the size of struct osp_update_request(which should never go over the wire). Signed-off-by: Vitaliy Kuznetsov Change-Id: I692461ddf0493727e2dea222b6721c952d3166a1 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50224 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Mikhail Pershin Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/osp/osp_trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osp/osp_trans.c b/lustre/osp/osp_trans.c index 302d172..49cd0d7 100644 --- a/lustre/osp/osp_trans.c +++ b/lustre/osp/osp_trans.c @@ -401,7 +401,7 @@ int osp_prep_update_req(const struct lu_env *env, struct obd_import *imp, } req_capsule_set_size(&req->rq_pill, &RMF_OUT_UPDATE_HEADER, RCL_CLIENT, - sizeof(struct osp_update_request)); + sizeof(struct out_update_header)); req_capsule_set_size(&req->rq_pill, &RMF_OUT_UPDATE_BUF, RCL_CLIENT, buf_count * sizeof(*oub)); -- 1.8.3.1