summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorEric Sandeen2009-04-24 21:08:45 +0200
committerKarel Zak2009-04-24 21:08:45 +0200
commit0295be0377d478c709d5176d93196367a5dac638 (patch)
tree15f928fa63e85765fc3581dc284b02cbfe0f2eaa /configure.ac
parentagetty: IUCLC and OLCUC are Linux extensions (diff)
downloadkernel-qcow2-util-linux-0295be0377d478c709d5176d93196367a5dac638.tar.gz
kernel-qcow2-util-linux-0295be0377d478c709d5176d93196367a5dac638.tar.xz
kernel-qcow2-util-linux-0295be0377d478c709d5176d93196367a5dac638.zip
blkid: remove whole-disk entries from cache when partitions are found
We can get into a situation in blkid where whole disks remain in the cache, even though partitions are found. For labels such as sun disklabels which may have the first partition beginning at sector 0, this is even somewhat likely. 1) create a sun disklabel w/partitions 2) mkfs the first partition (at sector 0) 3) remove the partition table 4) run blkid - this finds the fs on the whole disk, places in cache 5) recreate the partition table 6) run blkid - this finds the partition, places in cache And now we have both /dev/sda and /dev/sda1 in cache. There are heuristics in probe_all to avoid putting the whole disk in cache if it has partitions, but there is nothing to remove the whole-disk entry in the above case. I think the below patch suffices, although I haven't quite convinced myself that setting the lens[which]=0; is the right logic for that bit of state... Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions