Hello,

I haven't yet looked at the patches, but here are a couple of preliminary 
comments.  I'll take a careful look at the patches later today.

On Wednesday 13 December 2006 07:54, Oliver Lehmann wrote:
> Kern Sibbald wrote:
> 
> > Please fix it up correctly, then send it to me in the same diff format 
versus 
> > the current CVS, but please send it as an attachment to avoid the 
possibility 
> > of word wrap.  I'll then take a look at putting it in the code.  If you 
send 
> > it in the next few days, it will probably become part of 1.40.0 ...
> 
> I've attached 2 patches (will both apply with some offset)
> 
> patch-src-findlib-create_file.c
>   Try to unset file flags of the sourcefile when the hardlink failed.
>   Retry to hardlink then. If the hardlink fails then again, restore the
>   file flags of the sourcefile. If the hardlink was created w/o errors,
>   restore the fileflags of the sourcefile.

OK, this sounds very good.  Thanks.

> 
> patch-src-findlib-attribs.c
>   when restoring a symlink, use lchflags to restore the file flags
>   defined for the symlink ("new feature")
>   when restoring a hardlink, don't call chmod, chown, utime because it is
>   a hardlink and don't  have such attributes (as far as I know, if someone
>   with more FS-foo can step up and confirm this?). Changing this
>   attributes will change the sourcefiles attributes which is probably not
>   what is wanted here anyway....

I'll have to think about this a bit more.  However, I don't think it is 
correct to skip setting the attributes.  To understand hardlinks, the first 
thing is to realize that the name is slightly misleading.  A hard link is not 
really a link.  The data for the two files the attributes are one and the 
same.  The situation is very different from a softlink where there is a 
separate directory entry that "points" to an existing file.  

Thus to properly restore a hardlink you must also reset the attributes or you 
could potentially end up with incorrect attributes (owner, modes, ...).


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to