diff options
author | Karel Zak | 2012-01-25 12:56:39 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-25 13:20:37 +0100 |
commit | b82590ad46acf9fe8d332b53875e24c3c31e2482 (patch) | |
tree | 6e2f7e53424393b1925a896a309d2913ae48c136 /Documentation | |
parent | blkid: remove -w option from man page and usage() output (diff) | |
download | kernel-qcow2-util-linux-b82590ad46acf9fe8d332b53875e24c3c31e2482.tar.gz kernel-qcow2-util-linux-b82590ad46acf9fe8d332b53875e24c3c31e2482.tar.xz kernel-qcow2-util-linux-b82590ad46acf9fe8d332b53875e24c3c31e2482.zip |
blkid: move cache to /run on new systems
Why?
* read-only root
* /etc is pretty bad place for caches
* all is usually cached by udev in /dev/disk/by-* and libblkid
is able to use these symlinks
* boot persistent cache is attractive for very small subset of
Linux machines (and they already need extra udev tunning otherwise
udev will probe all block devices during boot)
* the default is possible to override in /etc/blkid.conf
The systems without /run directory will not be affected by this
change.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/blkid.txt | 10 | ||||
-rw-r--r-- | Documentation/howto-debug.txt | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/Documentation/blkid.txt b/Documentation/blkid.txt index 4fa9be1f7..c58b04f67 100644 --- a/Documentation/blkid.txt +++ b/Documentation/blkid.txt @@ -58,7 +58,7 @@ type, or label, or uuid for a particular device: } If a program needs to call multiple blkid functions, then passing in a -cache value of NULL is not recommended, since the /etc/blkid.tab file +cache value of NULL is not recommended, since the blkid.tab file will be repeatedly parsed over and over again, with memory allocated and deallocated. To initialize the blkid cache, blkid_get_cache() function is used: @@ -66,9 +66,11 @@ function is used: if (blkid_get_cache(&cache, NULL) < 0) goto errout; -The second parameter of blkid_get_cache (if non-zero) is the alternate -filename of the blkid cache file (where the default is -/etc/blkid.tab). Normally, programs should just pass in NULL. +The second parameter of blkid_get_cache (if non-zero) is the alternate filename +of the blkid cache file (see blkid man page for more information about the +default cach file location). + +Normally, programs should just pass in NULL. If you have called blkid_get_cache(), you should call blkid_put_cache() when you are done using the blkid library functions. This will save the diff --git a/Documentation/howto-debug.txt b/Documentation/howto-debug.txt index 28c6e2252..99e2755d4 100644 --- a/Documentation/howto-debug.txt +++ b/Documentation/howto-debug.txt @@ -58,8 +58,9 @@ The libblkid reads by default /etc/blkid.conf which can be overriden by the environment variable BLKID_CONF. See manual libblkid/libblkid.3 for details about the configuration file. -Block device information is normally kept in a cache file /etc/blkid.tab that -can be overridden by the environment variable BLKID_FILE. +Block device information is normally kept in a cache file (see blkid man page +for more information about the cache file location) that can be overridden by +the environment variable BLKID_FILE. To libmount uses three paths, which can be override by using environment variables. Notice that these environment variables are ignored for non-root |