Blame SOURCES/lvm2-2_03_12-pvck-fix-warning-and-exit-code-for-non-4k-mda1-offse.patch

abb29f
 tools/pvck.c | 10 +++++++---
abb29f
 1 file changed, 7 insertions(+), 3 deletions(-)
abb29f
abb29f
diff --git a/tools/pvck.c b/tools/pvck.c
abb29f
index c36e182..88350de 100644
abb29f
--- a/tools/pvck.c
abb29f
+++ b/tools/pvck.c
abb29f
@@ -1140,9 +1140,13 @@ static int _dump_label_and_pv_header(struct cmd_context *cmd, uint64_t labelsect
abb29f
 			*mda1_offset = xlate64(dlocn->offset);
abb29f
 			*mda1_size = xlate64(dlocn->size);
abb29f
 
abb29f
-			if (*mda1_offset != 4096) {
abb29f
-				log_print("CHECK: pv_header.disk_locn[%d].offset expected 4096 # for first mda", di);
abb29f
-				bad++;
abb29f
+			/*
abb29f
+			 * mda1 offset is page size from machine that created it,
abb29f
+			 * warn if it's not one of the expected page sizes.
abb29f
+			 */
abb29f
+			if ((*mda1_offset != 4096) && (*mda1_offset != 8192) && (*mda1_offset != 65536)) {
abb29f
+				log_print("WARNING: pv_header.disk_locn[%d].offset %llu is unexpected # for first mda",
abb29f
+					  di, (unsigned long long)*mda1_offset);
abb29f
 			}
abb29f
 		} else {
abb29f
 			*mda2_offset = xlate64(dlocn->offset);