Whamcloud - gitweb
LU-11510 lfs: migrate a composite layout file correctly 14/37814/2
authorEmoly Liu <emoly@whamcloud.com>
Wed, 26 Feb 2020 14:12:59 +0000 (22:12 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Apr 2020 21:15:15 +0000 (21:15 +0000)
commitdc88cb0843e57be3930558e4e1b5c9b5d3af3311
tree2bdece8ecc4185e80d225c3d7595bd716f295f86
parentc7b3f4dce2ffda3934798946bf14bb2614319919
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.

Lustre-change: https://review.whamcloud.com/36082
Lustre-commit: 8bedfa377fbd0c9f1b6ea2c40d36fdcaa52137df

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