It should be possible to use the value of
pathconf("path/to/destination", _POSIX_TIMESTAMP_RESOLUTION) to
determine the minimum timestamp resolution and to set
--modify-window accordingly by default.
http://www.opengroup.org/onlinepubs/9699919799/functions/fpathconf.html
Unfortunately, this does not seem to exist in Debian. :(
Maybe in the mean time, rsync chould use statfs(3)'s f_fsid field
and set --modify-window to a default of 2 for FAT/VFAT destinations?
I realise this is a hack, but it'd be useful until
_POSIX_TIMESTAMP_RESOLUTION became available.
Thanks,
The biggest problem with both solutions is that you would have to check the filesystem / _POSIX_TIMESTAMP_RESOLUTION thing for every directory you traverse, as there may be FAT filesystems on subdirectories or bind mounts etc.; this may cause a hefty overhead. Paul