Whamcloud - gitweb
LU-13397 lfs: mirror extend/copy keeps sparseness
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 23 Nov 2020 11:06:12 +0000 (14:06 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 6 Mar 2021 20:32:01 +0000 (20:32 +0000)
commitd528142f9df76718dc97748e843675bdd63daa26
treefce86e4b4bef5768ec70510beda87e3accd779aa
parent876b44984d279418b069da25ff2c60b154b51f3a
LU-13397 lfs: mirror extend/copy keeps sparseness

- make ll_lseek() to work under group lock and on designated
  mirror
- enhance lfs mirror copy functions migrate_copy_data() and
  llapi_mirror_copy_many() with lseek() to find holes and copy
  only data chunks.

Both 'migrate' and 'copy' lfs functionality rewrite designated
mirror fully, so holes are not punched in destination file, but
truncate is called first to make sure old data is erased.

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ic4a8768b816c921acd7f0adb3311138caac05a7c
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/41848
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/llite/file.c
lustre/tests/sanity-flr.sh
lustre/utils/Makefile.am
lustre/utils/lfs.c
lustre/utils/liblustreapi_lseek.c [new file with mode: 0644]
lustre/utils/liblustreapi_mirror.c