Whamcloud - gitweb
LU-13397 lfs: mirror extend/copy keeps sparseness 72/40772/10
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 23 Nov 2020 11:06:12 +0000 (14:06 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Mar 2021 04:15:38 +0000 (04:15 +0000)
commit0561c144cc1bb623e05d08b5055009e8d86047f4
treedca92ed01b787c6a4e1b578ae208b3a60b604de4
parent49b9e818b8c18ce968feff881630cd6ad3185007
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/40772
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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