1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

lvmlockd: detect when dlm lvb is invalidated

The lvb content can be lost during dlm recovery,
and we need to detect when this happens to revalidate.
This commit is contained in:
David Teigland 2015-08-26 14:55:27 -05:00
parent 32e22a0037
commit 58713d34dd

View File

@ -1057,7 +1057,18 @@ static int res_lock(struct lockspace *ls, struct resource *r, struct action *act
/* lm_lock() reads new r_version */ /* lm_lock() reads new r_version */
if ((r_version > r->version) || (!r->version && !r->version_zero_valid)) { if ((r_version != r->version) || (!r->version && !r->version_zero_valid)) {
/*
* r_version only increases, so if it goes down, it means the
* dlm lvb became invalid (happens during recovery if the
* resource master leaves).
*/
if (r_version < r->version) {
log_debug("S %s R %s res_lock lvb invalid r_version %u prev %u",
ls->name, r->name, r_version, r->version);
}
/* /*
* New r_version of the lock: means that another * New r_version of the lock: means that another
* host has changed data protected by this lock * host has changed data protected by this lock