]> sourceware.org Git - lvm2.git/commitdiff
activation: continue with autoactivation if refresh fails
authorPeter Rajnoha <prajnoha@redhat.com>
Wed, 27 Nov 2013 07:20:02 +0000 (08:20 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Wed, 27 Nov 2013 07:20:02 +0000 (08:20 +0100)
If the refresh fails for any reason before autoactivation, let's not
make this a stopper for autoactivation itself - just log the error
message if it appears.

The reason is that in some rare situations, we can still hit the
problem with the suspend call to fail (as already described in
commit d8085edf65006a50608edb821b3d30947abaa838, also
https://bugzilla.redhat.com/show_bug.cgi?id=1027314). The refresh
itself is done for only one reason - to refresh any dm tables
for LVs for which the underlying PVs got unplugged/disconnected
and then plugged/connected back (see also
https://bugzilla.redhat.com/show_bug.cgi?id=954061 for more info).
In this case, the major:minor pair is changed and we need to
update dm tables for LVs accordingly.

Now if refresh fails, the error is still logged, but autoactivation
continues.

tools/pvscan.c

index ce8c446e679add1ef720c0b265b38c944243f140..981a9c2b29738e12eac9d8f58a72787f956ea96b 100644 (file)
@@ -147,10 +147,8 @@ static int _auto_activation_handler(struct cmd_context *cmd,
                usleep(REFRESH_BEFORE_AUTOACTIVATION_RETRY_USLEEP_DELAY);
        }
 
-       if (!refresh_done) {
+       if (!refresh_done)
                log_error("%s: refresh before autoactivation failed.", vg->name);
-               goto out;
-       }
 
        if (!vgchange_activate(vg->cmd, vg, activate)) {
                log_error("%s: autoactivation failed.", vg->name);
This page took 0.042421 seconds and 5 git commands to generate.