From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: <util-linux@vger.kernel.org>
Subject: Re: libblkid: Idea to force given cached entry to be invalidated?
Date: Tue, 15 Apr 2014 12:52:46 +0800 [thread overview]
Message-ID: <534CBB1E.70701@cn.fujitsu.com> (raw)
In-Reply-To: <20140415042729.GC3403@thunk.org>
-------- Original Message --------
Subject: Re: libblkid: Idea to force given cached entry to be invalidated?
From: Theodore Ts'o <tytso@mit.edu>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2014年04月15日 12:27
> On Tue, Apr 15, 2014 at 10:15:01AM +0800, Qu Wenruo wrote:
>> Though the above patch try to avoid the whole cache, it's not good enough
>> since it break the pricible not
>> to probe the devices too frequently.
>>
>> After some searching, it seems that libblkid does not provide such API, or
>> am I missing something?
> The blkid_verify() function is designed to make sure the information
> in the cache corresponds with reality. If it does not, it will update
> the cache to match with reality, so it will do what you want.
>
> Using blkid_verify() will involve accessing the disk involved, but
> that's still better than the alternative of scanning all of the disks
> in the system.
>
> Cheers,
>
> - Ted
> --
> To unsubscribe from this list: send the line "unsubscribe util-linux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
I hope I was wrong but according to the codes, blkid_verify() seems
still using the cache:
------
blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
{
......
(diff < BLKID_PROBE_MIN ||
(dev->bid_flags & BLKID_BID_FL_VERIFIED &&
diff < BLKID_PROBE_INTERVAL)))
return dev;
------
So it seems not working in the case.
Also in the btrfs-progs codes, it has already called blkid_verify()
before operations.
Thanks,
Qu.
next prev parent reply other threads:[~2014-04-15 4:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 2:15 libblkid: Idea to force given cached entry to be invalidated? Qu Wenruo
2014-04-15 4:27 ` Theodore Ts'o
2014-04-15 4:52 ` Qu Wenruo [this message]
2014-04-15 11:21 ` Karel Zak
2014-04-16 0:53 ` Qu Wenruo
2014-04-16 9:03 ` Karel Zak
2014-04-17 1:17 ` Qu Wenruo
2014-04-17 8:21 ` Karel Zak
2014-04-17 8:29 ` Qu Wenruo
2014-04-18 11:02 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534CBB1E.70701@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=tytso@mit.edu \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.