Description of problem: When lvs finds invalid percentage output in snapshot, it could give much better output. Here is an example of current output: "lvm" lvs -a -o +devices >> "/tmp/lvmdump.pTiSOI/lvmdump-a/lvs" 2>> "/tmp/lvmdump.pTiSOI/lvmdump-a/lvmdump.log" Percentage too large. dm_report_object: report function failed for field data_percent LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert Devices root rhel -wi-ao---- 10.31g /dev/vda2(307) swap rhel -wi-ao---- 1.20g /dev/vda2(0) origin snapper owi-a-s--- 300.00m /dev/vdc1(0) verify_snap snapper swi-a-s--- 100.00m origin It's not quite straightforward to see what went wrong and also even some fields are missing because some previous field failed (i.e. missing device list) lvm2 should do a better job here. Version-Release number of selected component (if applicable): 2.02.105 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Looking at the condition when the "Percentage too large." is issued, the value must have had more than 7 characters, while 1 is reserved for the '\0' at the end of the string, 1 for the decimal point, 2 are reserved for tenths and hundredths and the rest for the integer part (3 digits). So the value must have been more than 999 for some reason, probably error case. So if percentage is not in sane 0%-100% range for a field, we could just report DM_PERCENT_INVALID as raw value with "Invalid" keyword displayed probably...