Whamcloud - gitweb
LU-16896 flr: resync should not change file size 44/51344/6
authorBobi Jam <bobijam@whamcloud.com>
Sat, 17 Jun 2023 00:51:26 +0000 (08:51 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 31 Aug 2023 06:31:15 +0000 (06:31 +0000)
commitb9ce342ee196af48d2d25e2811121fe4471f5fd2
tree65407a4c25dc033db5c616735cf62a185812286c
parentc9e752c141d3f5c1c76052fbc4a9450c7d467279
LU-16896 flr: resync should not change file size

mirror resync could punch a hole reaching the end of file in a
mirror, which could change the file size when the mirror is referred.

This patch calls truncate after punch in this case to keep the file
size unchanged in the mirror.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ia0fc1f220a32a60f3516c69e86867796ae5c35c7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51344
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/fsx.c
lustre/tests/sanity-flr.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi_layout.c