D16255: [Scheduler] Fix wrong usage of obsolete QFileInfo::created() timestamp
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Tue Oct 16 18:39:08 BST 2018
bruns created this revision.
bruns added reviewers: Baloo, Frameworks, poboiko, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.
REVISION SUMMARY
Baloo uses the metadata change time (stat.st_ctime, man 7 inode) to check
for XAttr updates. This field corresponds to
QFileInfo::metadataChangeTime(), while created() returns the first
available of [birthtime, ctime, mtime].
On filesystems supporting birthtime (XFS, BTRFS) some files were
continously reindexed as the BasicIndexingJob stored the ctime, while the
UnindexedFileIterator compared the stored value with the btime. On the
other hand, XAttr changes where not detected when ctime and btime
initially matched, as the btime is fixed.
While at it, document the semantics of the two timestamps.
TEST PLAN
1. watch baloo_file with strace -efile during startup -> files with btime != ctime are indexed just once
2. add a Tag to a file -> file is immediately updated in index, not just after baloo_file restart (e.g. session restart)
REPOSITORY
R293 Baloo
BRANCH
indexer_cleanup
REVISION DETAIL
https://phabricator.kde.org/D16255
AFFECTED FILES
src/engine/documenttimedb.h
src/file/basicindexingjob.cpp
src/file/modifiedfileindexer.cpp
src/file/unindexedfileiterator.cpp
To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181016/e4035722/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list