andoma Posted May 6, 2014 Report Share Posted May 6, 2014 It would be really nice if btsync could utilize btrfs generations to quickly refresh its internal database upon startup. Btrfs, being a copy-on-write filesystem, have built-in features to quickly list changes to the file system since a given point in time (generation) Example: root@skytown:/storage/media# btrfs subvolume show ./storage/mediaName: mediauuid: 6cde316a-1cad-4f41-a718-30a45292f9b6Parent uuid: -Creation time: 2014-05-04 07:15:24Object ID: 257Generation (Gen): 959Gen at creation: 6Parent: 5Top Level: 5Flags: -Snapshot(s): We're currently at generation 959, then i write to a file. root@skytown:/storage/media# echo foo > Music/Other/test After the transaction have committed (which it always does after 30 seconds, or due to sync() or umount, etc) we can query the filesystem for files that have changed since (a very fast operation compared to scanning the entire hierarchy) : root@skytown:/storage/media# btrfs subvolume find-new . 959inode 65807 file offset 0 len 4 disk start 0 offset 0 gen 1021 flags INLINE Music/Other/testtransid marker was 1021 and we are now at generation 1021. I think it would be possible for btsync to utilize the btrfs generations to quickly refresh its internal state rather than having to scan the entire filesystem on startup. Please consider adding support for this, it would be super awesome. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.