]> sourceware.org Git - lvm2.git/commit
dmstats: only generate aux data separator if group tag is defined 2/head 1034547064 1034874341
authorBryn M. Reeves <bmr@redhat.com>
Thu, 28 Sep 2023 14:06:24 +0000 (15:06 +0100)
committerZdeněk Kabeláč <zdenek.kabelac@gmail.com>
Thu, 12 Oct 2023 11:31:14 +0000 (11:31 +0000)
commit0ff027ae2c40066e2dd49cb4a377884d7e10dcf2
tree6f19bb2856632d8c62f63c10d97595bbf67c960e
parent995c7b503b9853a1773134724a429105a6a12c9c
dmstats: only generate aux data separator if group tag is defined

Fix a bug in _stats_set_aux() that causes bogus data to appear
in the 'userdata' field of stats reports when previously grouped
regions are ungrouped:

/var/tmp/File With Spaces: Created new group with 1 region(s) as group ID 0.

Removed group ID 0 on fedora-root

Name             GrpID RgID ObjType RgStart RgSize  #Areas ArSize  ProgID  UserData
fedora-root          -    0 region    6.39g 100.00m      1 100.00m dmstats #-
                                                                           ^^
This is the aux_data separator character followed by empty user data.
The _stats_set_aux() function should only emit the separator if
there is a valid group descriptor for the region.
libdm/libdm-stats.c
test/shell/dmstats-group-ungroup-nouserdata.sh [new file with mode: 0644]
test/shell/dmstats-group-ungroup-userdata.sh [new file with mode: 0644]
This page took 0.038904 seconds and 5 git commands to generate.