Will rsync support btrfs file system?

Jamie Lokier jamie at shareable.org
Sun Dec 6 20:06:05 MST 2009


Benjamin R. Haskell wrote:
> find /home/ -xdev -type d | sudo inotifywait --fromfile - -m | perl -lnwe 'BEGIN{$|=1;} print unless $h{$_}; $h{$_}++'

The biggest problem in my experience is it can take 5 minutes of
thrashing to set up the inotifies on a large /home directory, from
cold cache and rotational media.  By large, we are talking 100000
directories.

That's is one of the things Eric Paris has been looking at with
fanotify and "recursive" watches.  Although I have argued that
fanotify isn't a suitable interface for this sort of thing, the
fsnotify improvements in this direction are good.

But it's worse than that, because to check for changes, due to the
change information being transient (not stored), you have to call
stat() on every file to check if it's mtime/size have changed too,
which amounts to having to read every inode in the whole filesystem.
At which point we're talking 20 minutes on a large /home on a laptop.

Maybe that's what btrfs are planning to address: persistent storage of
a change list which you can read without scanning the whole filesystem.

inotify/fanotify solutions to that are more involved (using both APIs
together), but interestingly they look feasible without special
filesystem support, so would work for any filesystem.

-- Jamie


More information about the rsync mailing list