Whamcloud - gitweb
EX-2067 lpurge: check layout before opening
authorJohn L. Hammond <jhammond@whamcloud.com>
Fri, 24 Sep 2021 17:59:31 +0000 (10:59 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 2 Oct 2021 18:44:49 +0000 (18:44 +0000)
commitebecdabd60da021eb68f74d99dab909858c590c1
tree442dd6ea43dac3a4a1e9de2efd0a78406ac553e4
parenta472a92866a47428714c0ea94ef32945a8834334
EX-2067 lpurge: check layout before opening

In lpurge_mirror_delete(), fetch the layout by getxattr() and check if
we would be deleting the last stale mirror before we open the
file. This is to avoid breaking the lease held by a concurrent mirror
resync.

Lustre-change: https://review.whamcloud.com/45033
Lustre-commit: 912766d05efd95886597a46dcbaaf10237e56ebf

Test-Parameters: trivial testlist=hot-pools
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Change-Id: I8b1addd14b290faa537fcc15514cae8b18c802f2
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45111
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lipe/src/lpurge.c
lustre/tests/hot-pools.sh [changed mode: 0644->0755]