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 /TODO | |
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 'TODO')
0 files changed, 0 insertions, 0 deletions