Moving files revisited

Wayne Davison wayned at
Fri Feb 1 09:15:27 EST 2002

On Thu, 31 Jan 2002, Dave Dykstra wrote:
> Ouch, is that another byte for every file?  Are there no bits free in
> the "flags" field already in file_struct?

Yes, it is an extra byte per file.  An earlier patch of mine did use
bits in the existing flag word in the current per-file structure,
but since that structure is created before the receiver forks off the
generator, I was thinking that any bit-twiddling of the existing flags
would cause a lot of shared memory between the two processes to cease
being shared (on systems that support copy-on-write forks, such as
Linux).  Thus, I think it would be more memory intensive to use the
existing data structure's flags (but I haven't verified this with actual
memory-size testing).

One solution to this would be to use actual shared memory for the file
structure shared by the receiver & generator.

As for the move-files option, I was thinking that I could write a perl
script that would parse the output of rsync -v and delete files that
were successfully transferred by rsync when they show up in the verbose
output.  If can make that work, the need for my nohang patch isn't as
great, and I could probably come up with a simpler way to keep the redo
channel from filling up (perhaps using a buffer in the receiver process
or looking into how to do some portable shared memory).  Hmm, something
to consider.


More information about the rsync mailing list