diff options
author | Karel Zak | 2010-03-17 14:49:14 +0100 |
---|---|---|
committer | Karel Zak | 2010-03-17 14:49:14 +0100 |
commit | 6c2f2b9d62b196296e827f8bb7336a39e80695a9 (patch) | |
tree | b4da6079a7a7af0080989e37782cc07465d5d760 /configure.ac | |
parent | lib: fix blkdev_find_size() (diff) | |
download | kernel-qcow2-util-linux-6c2f2b9d62b196296e827f8bb7336a39e80695a9.tar.gz kernel-qcow2-util-linux-6c2f2b9d62b196296e827f8bb7336a39e80695a9.tar.xz kernel-qcow2-util-linux-6c2f2b9d62b196296e827f8bb7336a39e80695a9.zip |
libblkid: add microsecond resolution for cache entries
The libblkid library uses stat.st_mtine to detect changes on the
device. The last update time of of the device in the cache is stored
as TIME= tag in the /etc/blkid.tab file.
Linux since 2.5.48 supports nanosecond resolution and more precise
time is available in the stat.st_mtim timespec struct.
This patch add microsecond precision to TIME= tag in the cache file,
old format:
TIME="<sec>"
the new format:
TIME="<sec>.<usec>"
This change is backwardly compatible.
Now, the blkid_verify() function checks stat.st_mtime and
stat.st_mtim.tv_nsec/1000.
Test:
# e2label /dev/sdb1 AAAA
old version:
# blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1
/dev/sdb1: LABEL="AAAA"
/dev/sdb1: LABEL="AAAA"
new version:
# blkid -s LABEL /dev/sdb1; e2label /dev/sdb1 BBBB; blkid -s LABEL /dev/sdb1
/dev/sdb1: LABEL="AAAA"
/dev/sdb1: LABEL="BBBB"
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9cc20b7ac..96d7219f9 100644 --- a/configure.ac +++ b/configure.ac @@ -601,6 +601,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ AC_CHECK_MEMBERS([struct termios.c_line],,, [[#include <termios.h>]]) +AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,, + [#include <sys/stat.h>]) + AC_CHECK_DECLS([ ADDR_NO_RANDOMIZE, FDPIC_FUNCPTRS, |