On Fri, Mar 14, 2003 at 08:33:10PM -0500, Bert Bee-Lindgren
wrote:> (I'm not sending this to dirvish@pegasus because I think that this
message
> applies more to rsync's --link-dest option than to just dirvish.)
>
> I recently noticed a huge spike in dirvish network usage and traced it to
> files whose permissions had been changed. (with rsync v2.5.6)
>
> I understand and agree that a --link-dest copy of a source file cannot be
> hardlinked to, but couldn't a simple file copy be done from the
link-dest
> directory and then the permissions/ownership be changed of that new copy?
>
> I think that this would reduce network usage by increasing the value of the
> link-dest files. In some cases (chown/chmod -R, etc), the difference would
> be immense.
>
> What do people think? And any guidance on where I (or someone else!) might
> start changing the code?
The network traffic in this case is the blocksums and file
block copy instructions. This is the same traffic that you
would get if you updated the timestamps.
It would be possible. What would have to be done is to
completely rearrange skip_file() moving the link_dest tests
to the end and having them copy the file and set the
meta-data of the copy only if all other tests show no
change. The logic of skip_file would have be considerably
altered for this. You don't want to copy the file unless it
would otherwise be skipped.
I haven't considered this a priority. The increased network
load shouldn't be that large and only occurs when you
chown/chmod/chgrp a file with no other changes.
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws
Remember Cernan and Schmitt