Whamcloud - gitweb
LU-15486 lod: mirroring a plain file in mirrored-layout dir 17/46517/2
authorBobi Jam <bobijam@whamcloud.com>
Mon, 14 Feb 2022 11:50:04 +0000 (19:50 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Aug 2022 19:53:25 +0000 (19:53 +0000)
commit8005a374cac2ba726a88cec3c1bb331fc96153a1
tree601f537eda8f313c8da1096bdae2bf207cea9f0e
parente34950d29f1168a8a85f26e862eaec888b94350e
LU-15486 lod: mirroring a plain file in mirrored-layout dir

If a file does not have a mirror in a directory with a default FLR
mirror, then "lfs mirror extend" on the file fails with
"cannot create volatile file: Invalid argument".

This comes from the the non-striped file layout generated from
LOD inheriting its FLR state from the default FLR while it contains
no mirror in it, and lov_init_composite() will complain about it.

 if (equi(flr_state == LCM_FL_NONE, comp->lo_mirror_count > 1))
         RETURN(-EINVAL);

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I5e849acb2327ce735d0008271bfd48fa7293161c
Reviewed-on: https://review.whamcloud.com/46517
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_lov.c
lustre/tests/sanity-flr.sh