libblkid: cache is incorrectly revalidated

for example:

	# echo "password" | cryptsetup luksFormat /dev/loop7
	# blkid /dev/loop7
	/dev/loop7: UUID="09240a80-1cf1-456d-9a6e-a35b39dc1f2b" TYPE="crypto_LUKS"

	# pvcreate -ff /dev/loop7
	# blkid /dev/loop7
	#

the second blkid call has to return info about LVM.

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2010-11-23 19:49:58 +01:00
parent cf59b09c1e
commit e8fc977aba
2 changed files with 5 additions and 6 deletions

View File

@ -437,7 +437,7 @@ extern size_t blkid_rtrim_whitespace(unsigned char *str);
((bmp)[ blkid_bmp_idx_byte(item) ] |= blkid_bmp_idx_bit(item))
#define blkid_bmp_unset_item(bmp, item) \
((bmp)[ bmp_idx_byte(item) ] &= ~bmp_idx_bit(item))
((bmp)[ blkid_bmp_idx_byte(item) ] &= ~blkid_bmp_idx_bit(item))
#define blkid_bmp_get_item(bmp, item) \
((bmp)[ blkid_bmp_idx_byte(item) ] & blkid_bmp_idx_bit(item))

View File

@ -431,14 +431,13 @@ int __blkid_probe_invert_filter(blkid_probe pr, int chain)
struct blkid_chain *chn;
unsigned long *fltr;
fltr = blkid_probe_get_filter(pr, chain, FALSE);
if (!fltr)
return -1;
chn = &pr->chains[chain];
if (!chn->driver->has_fltr || !chn->fltr)
return -1;
for (i = 0; i < blkid_bmp_nwords(chn->driver->nidinfos); i++)
fltr[i] = ~fltr[i];
chn->fltr[i] = ~chn->fltr[i];
DBG(DEBUG_LOWPROBE, printf("probing filter inverted\n"));
/* blkid_probe_dump_filter(pr, chain); */