Bug 832069 - [Regression] blkid -g has no effect on RHEL6
[Regression] blkid -g has no effect on RHEL6
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Karel Zak
qe-baseos-daemons
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 08:44 EDT by Martin Kyral
Modified: 2012-06-25 08:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 833732 (view as bug list)
Environment:
Last Closed: 2012-06-25 08:07:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Kyral 2012-06-14 08:44:42 EDT
Description of problem:
blkid -g shall clean the removed block devices from the cache (/etc/blkid/blkid.tab). However, on RHEL6 invoking blkid -g on system having removed devices in the cache has no effect ($? is 0). The bug was verified with both loop device and real partition.

Version-Release number of selected component (if applicable):
util-linux-ng-2.17.2-12.4.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. dd if=/dev/zero of=/tmp/blkidloop bs=1024 count=1000
2. yes | mke2fs -T ext3 -L blkidloop -b 1024 /tmp/blkidloop
3. blkid /tmp/blkidloop
4. rm -f /tmp/blkidloop
5. blkid -g
6. grep blkidloop /etc/blkid/blkid.tab
  
Actual results:
A record similar to this is found:
<device DEVNO="0x0000" TIME="1339677331.186635" LABEL="blkidloop" UUID="ff340cb5-dc07-402f-bd7c-1c239a166dfb" TYPE="ext2">/tmp/blkidloop</device>

Expected results:
No record is found

Additional info:
Running blkid without any parameter removes the invalid entry from the cache and prints the cache contents so it can be used as a workaround.
Comment 3 Karel Zak 2012-06-25 08:07:31 EDT
- regression against what? .. the current behavior is pretty old
(since e2fsprogs > v1.41.4, commit fe144e11 in e2fsprogs tree and commit
1de91705 in util-linux tree)

- the -g options is there for backward compatibility only than 
for anything useful
 
- blkid.tab is *private* libblkid cache file, it's not API. The file and
arbitrary functionality around the file maybe changed.
Comment 4 Martin Kyral 2012-06-25 08:30:56 EDT
Regression against RHEL5, where the feature was introduced (and is working): https://bugzilla.redhat.com/show_bug.cgi?id=563909

If the feature have no use anymore and is present for backward compatibility only, it shall be at least stated in the documentation. Now the man page says: "-g     Perform a garbage collection pass on the blkid cache to remove devices which no longer exist."

Note You need to log in before you can comment on or make changes to this bug.