Whamcloud - gitweb
LU-11485 lod: disallow setting the last non-stale mirror as stale 95/36195/3
authorJian Yu <yujian@whamcloud.com>
Mon, 16 Sep 2019 19:15:03 +0000 (12:15 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 23 Sep 2019 08:43:49 +0000 (08:43 +0000)
commit79346930b340f73f27c28a1c53c73cc2138b8508
treec5caea90d98f741c6d67fef169d4fc76f5d54ca6
parent3a8d96a1ebff995cbdad359208ea0ce99482606a
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.

This patch is back-ported from the following one:
Lustre-commit: 29be32a759f696006a539d3cff74ca55a281aa64
Lustre-change: https://review.whamcloud.com/36141

Change-Id: I6934cfe0190cd1ea83de1cf28ddf840b9f96193a
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36195
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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