Whamcloud - gitweb
LU-11485 lod: disallow setting the last non-stale mirror as stale 41/36141/6
authorJian Yu <yujian@whamcloud.com>
Mon, 16 Sep 2019 05:56:33 +0000 (22:56 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Sep 2019 07:54:15 +0000 (07:54 +0000)
commitb380a1f9a1daa1683593d0ee4a508da859277164
tree1a7b7ed884a90f2565df48da58a64d5f4dd6510b
parent19b2bc9bbc25a94395465fba5900c1f862b5c6a1
LU-11485 lod: disallow setting the last non-stale mirror as stale

"lfs setstripe" allows setting stale flag on the last
non-stale mirror of a file, which makes the file have
no valid component to read and return IO error.

This patch fixes the above issue by disallowing that.
It also disallows "lfs mirror split" to destroy the
last non-stale mirror of a file.

Change-Id: I6934cfe0190cd1ea83de1cf28ddf840b9f96193a
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36141
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/lfs-mirror-split.1
lustre/doc/lfs-setstripe.1
lustre/lod/lod_object.c
lustre/tests/sanity-flr.sh
lustre/utils/lfs.c