Whamcloud - gitweb
LU-16549 osp: Fix sizeof for RMF_OUT_UPDATE_HEADER 24/50224/2
authorVitaliy Kuznetsov <vkuznetsov@ddn.com>
Tue, 7 Mar 2023 14:10:24 +0000 (17:10 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 Mar 2023 23:17:00 +0000 (23:17 +0000)
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 <vkuznetsov@ddn.com>
Change-Id: I692461ddf0493727e2dea222b6721c952d3166a1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50224
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osp/osp_trans.c

index 302d172..49cd0d7 100644 (file)
@@ -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));