[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hamm frozen, Slink created



On Thu, 26 Mar 1998 18:33:47 EST Dale Scheetz (dwarf@polaris.net) 
wrote:

> On Thu, 26 Mar 1998, Raul Miller wrote:
> 
> > Dale Scheetz <dwarf@polaris.net> wrote:
> > > What keeps mirror from recognizing the hardness of the link and
> > > reproducing the hard link in the local directory? I'm not suggesting
> > > that mirror is currently capable of this, just trying to figure out
> > > why it couldn't be.
> > 
> > There's no way to distinguish between a copied file and a hardlinked
> > file, without enhancing ftp.  Thus, all files must be downloaded
> > (and md5sums compared -- presumably you maintain a sorted list
> > of md5s during download) to implement this.  With symlinks, you
> > can avoid the redundant downloads.
> > 
> I take this to mean that currently ftp has no way to determine the inode
> of a file on the remote machine? That would certainly make it hard to
> impliment anything on the other end ;-)
> 
> Still, if the directories containing hard links could be identified for
> mirror, then it could simply read the directory and create the hard links
> in the target directory. (just dreaming)

You can get the inode number of any file with ftp.

ftp> ls -i

And build a inode num to file map or array.

There's still a problem, you need a pair of inode/device to sort stuff out
and you magic mirroring program might create "hard links" between two
unrelated files which have the same inode number on different devices.
Similarly, on the receiving machine if the mirror area has mounted
fs, the link() might fail (in which case you could fall back on a
symlink).

Unless we require mirrors to be contained within the same fs OR that
mount points are clearly marked (eg. we could detect mount points with
a lost+found directory).

Phil.



--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: