master - pvck: fix reading large mda1
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f140620043eb22b192e7d87e17a42fcd0a3656a1 Commit: f140620043eb22b192e7d87e17a42fcd0a3656a1 Parent: c6746181a3c2c40447f5a33e15359b57567f8217 Author: David Teigland <[email protected]> AuthorDate: Mon Mar 2 15:22:39 2020 -0600 Committer: David Teigland <[email protected]> CommitterDate: Tue Mar 3 13:47:07 2020 -0600
pvck: fix reading large mda1
When mda_size is larger than io_memory_size, reading the entire mda fails unless the previous read of the label has been invalidated.
--- tools/pvck.c | 7 +++++++ 1 file changed, 7 insertions(+)
tools/pvck.c +7 -0
@@ -981,6 +981,13 @@ static int _dump_label_and_pv_header(struct cmd_context *cmd, uint64_t labelsectreturn 0 ; } +/* +* Not invalidating this range can cause an error reading +* a larger range that overlaps this. +*/ +if (!dev_invalidate_bytes (dev, lh_offset,512 )) + stack; + lh = (struct label_header *)buf;if (print_fields) {