From b82590ad46acf9fe8d332b53875e24c3c31e2482 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 25 Jan 2012 12:56:39 +0100 Subject: 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 --- Documentation/blkid.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Documentation/blkid.txt') 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 -- cgit v1.2.3-55-g7522