Whamcloud - gitweb
LU-13375 flr: inherit the correct layout by "mirror extend -N" 79/38079/4
authorEmoly Liu <emoly@whamcloud.com>
Thu, 9 Apr 2020 10:22:28 +0000 (18:22 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 19 Apr 2020 08:45:24 +0000 (08:45 +0000)
commitf2a1c6e06f4dc5250cb72b1a6f4720f20486d502
tree43ceda5050d537158d9523693109663897182177
parent688d5da6a89882fdf9ebfb3e52ca869e9e959655
LU-13375 flr: inherit the correct layout by "mirror extend -N"

For PFL files, if stripe information is not specified to the cmd
"lfs mirror extend -N", the layout of the last initialized comp of
this file should be inherited by the mirror.
For example,
  lcm_mirror_count:  2
  lcm_entry_count:   4
    lcme_id:             65537
    lcme_mirror_id:      1
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   10485760
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_objects:
      - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x102:0x0] }

    lcme_id:             65538
    lcme_mirror_id:      1
    lcme_flags:          init
    lcme_extent.e_start: 10485760
    lcme_extent.e_end:   20971520
      lmm_stripe_count:  2
      lmm_stripe_size:   2097152
      lmm_objects:
      - 0: { l_ost_idx: 3, l_fid: [0x100030000:0x91:0x0] }
      - 1: { l_ost_idx: 0, l_fid: [0x100000000:0x13d:0x0] }

    lcme_id:             65539
    lcme_mirror_id:      1
    lcme_flags:          0
    lcme_extent.e_start: 20971520
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  -1
      lmm_stripe_size:   4194304

    lcme_id:             131073
    lcme_mirror_id:      2
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  2
      lmm_stripe_size:   2097152
      lmm_pool:          archive
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x17c:0x0] }
      - 1: { l_ost_idx: 2, l_fid: [0x100020000:0x103:0x0] }

sanity-flr.sh test_0f is modified to verify this patch.

Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: If7db3ec7ce9414a04a32e9995ba24f322fb93ab5
Reviewed-on: https://review.whamcloud.com/38079
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/tests/sanity-flr.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi_layout.c