Re: [ANNOUNCEMENT PATCH COW] proof of concept impementation of cowlinks
From: Denis Vlasenko
Date: Sun May 09 2004 - 09:12:01 EST
On Sunday 09 May 2004 01:10, Pavel Machek wrote:
> > That is probably unfixable now, but you can avoid making similar
> > error. Provide is_cowlinked(fd1,fd2) syscall. Pity you will
> > have to use different inode numbers for cowlinks (due to tar/cp),
> > and this won't fly:
> is_cowlinked does not fly, either. For n files, you have to do O(n^2)
> calls to find those that are linked.
Hm, let me think about it. diff does not need to check all permutations,
it checks only those two which it needs to compare.
IMHO "inodes done right" is something like this: if inode numbers are
different, then files are not hardlinked/cowlinked. If they are the same,
check is_hardlinked(a,b) or is_cowlinked(a,b) to find out.
This beats O(n^2) argument.
But this is non-POSIX, would not be accepted.
I don't know how to handle this now. Introducing cow-inode number
with semantic "cowino1==cowino2 => files are cowlinked" is
ugly and won't deal with per-block cow. Sooner or later someone
will want to have per block cow. Think about cow'ing multi-gigabyte
database files for checkpointing/backup purposes...
> You want get_cowlinked_id which can return -1 "I do not know".
Is this the same to my "cow-inode number" concept above?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/