]> sourceware.org Git - lvm2.git/commitdiff
vg_read: use new error flag
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 14 Nov 2014 13:55:57 +0000 (14:55 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 14 Nov 2014 17:09:27 +0000 (18:09 +0100)
Failed recovery provides different (NULL) VG then FAILED_INCONSISTENT.
Mark it with different failure bit - since FAILED_INCONSISTENT is
supposed to contain something 'usable' (thought inconsistent).

WHATS_NEW
lib/metadata/metadata-exported.h
lib/metadata/metadata.c

index 19f029b526f3b800053b7f94eb801e010254a5f2..4b526fada5ea5366c513a922ddd7ec3b2a4a8b19 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.113 - 
 =====================================
+  Failed recovery returns FAILED_RECOVERY status flag for vg_read().
   Exit with non-zero status code when pvck encounters a problem.
   Fix clean_tree after activation/resume for cache target (2.02.112).
 
index 375f7be96f95a112a65f600ca2857668cdb6f567..c472f41a70ebfd3d3ec2eeffe8b12543bfe9a106 100644 (file)
 #define FAILED_CLUSTERED       0x00000040U
 #define FAILED_ALLOCATION      0x00000080U
 #define FAILED_EXIST           0x00000100U
+#define FAILED_RECOVERY                0x00000200U
 #define SUCCESS                        0x00000000U
 
 #define VGMETADATACOPIES_ALL UINT32_MAX
index 11dabcc71d7f72196f24e6fc67763bf2dc5014da..601a7660a028baf2500d3362dd37c727f17c32c2 100644 (file)
@@ -4359,7 +4359,7 @@ static struct volume_group *_vg_lock_and_read(struct cmd_context *cmd, const cha
                if (!(vg = _recover_vg(cmd, vg_name, vgid))) {
                        log_error("Recovery of volume group \"%s\" failed.",
                                  vg_name);
-                       failure |= FAILED_INCONSISTENT;
+                       failure |= FAILED_RECOVERY;
                        goto bad_no_unlock;
                }
        }
This page took 0.054186 seconds and 5 git commands to generate.