Whamcloud - gitweb
LU-11510 lfs: migrate a composite layout file correctly 82/36082/10
authorEmoly Liu <emoly@whamcloud.com>
Wed, 26 Feb 2020 14:12:59 +0000 (22:12 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 5 Mar 2020 22:35:54 +0000 (22:35 +0000)
commit8bedfa377fbd0c9f1b6ea2c40d36fdcaa52137df
tree5ac44de2dc7baa185f703d413eade9db93fcd797
parent74f4393c74da4eac8bfcfe2a53b8621847701fd6
LU-11510 lfs: migrate a composite layout file correctly

The patch fixes the following issues:
- in function migrate_open_files(), "layout" pointer should be used
  instead of "param" pointer to tell whether a comp file should be
  created or not, because "param" pointer is always not null and
  the composite layout file will never be created;
- make --copy and --yaml options work correctly in lfs_migrate tool;
- when a composite layout file is migrated, "--copy" option will be
  added to preserve its layout in both lfs_migrate and "lfs migrate",
  and in such situation, pool name will be saved as well;
- when a file is restriped with -R option by lfs_migrate, the file
  will be set with its parent's stripe by default, by adding
  "--copy $parent_dir" option;
- do some code cleanup in lfs_migrate and sanity.sh test_56wb/c

sanity.sh test_56xd/xe are added to verify this patch.

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I85779c69e74444eb869f28add4363ad3a6835b97
Reviewed-on: https://review.whamcloud.com/36082
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/scripts/lfs_migrate
lustre/tests/sanity.sh
lustre/utils/lfs.c