[PATCH] One more -x to not traverse cyclic bind-mounts

Matt McCutchen matt at mattmccutchen.net
Wed Jan 19 12:52:17 MST 2011

On Wed, 2011-01-19 at 12:40 -0700, Jeff Hansen wrote:
> The way rsync determines if the directory is a mount point looks very
> portable to me (with the FLAG_TOP_DIR bit), and with this patch, it
> has worked on every Linux system I've tried so far (not sure if
> FLAG_TOP_DIR works on BSDs, but I'm guessing it does).

FLAG_TOP_DIR has nothing whatsoever to do with mount points.  Try the
following test:

$ mkdir -p src/foo
$ rsync -axxx src/ dest/

You'll find that your patch excludes "src/foo", which is on the same
filesystem as "src".


More information about the rsync mailing list