From: Timothy Day Date: Wed, 10 May 2023 07:32:51 +0000 (+0300) Subject: LU-16813 utils: move mirror_end initialization X-Git-Tag: 2.15.56~24 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=4cd4bfba473fb370767e1f2014d9fe1531889f82;p=fs%2Flustre-release.git LU-16813 utils: move mirror_end initialization Move initialization for mirror_end variable in llapi_mirror_resync_many(), otherwise lfs mirror resync may fail since mirror_end gets reset on each pass of the loop. Fixes: b0297a1056 ("LU-16518 lnet: fix clang build errors") Test-Parameters: testlist=sanity-flr env=ONLY=42,ONLY_REPEAT=100 Signed-off-by: Timothy Day Change-Id: I4edc078cd6e30d7a0ad84383b55b63b885a34d4b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50919 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger --- diff --git a/lustre/utils/liblustreapi_layout.c b/lustre/utils/liblustreapi_layout.c index 10f82be..9bdeb7c 100644 --- a/lustre/utils/liblustreapi_layout.c +++ b/lustre/utils/liblustreapi_layout.c @@ -2932,6 +2932,7 @@ int llapi_mirror_resync_many(int fd, struct llapi_layout *layout, void *buf; uint64_t pos = start; uint64_t data_off = pos, data_end = pos; + uint64_t mirror_end = LUSTRE_EOF; uint32_t src = 0; int i; int rc; @@ -2942,7 +2943,6 @@ int llapi_mirror_resync_many(int fd, struct llapi_layout *layout, return -rc; while (pos < end) { - uint64_t mirror_end = LUSTRE_EOF; ssize_t bytes_read; size_t to_read; size_t to_write;