LWN.net Logo

COW Links

COW Links

Posted Apr 1, 2004 13:10 UTC (Thu) by nix (subscriber, #2304)
Parent article: COW Links

This looks to be terribly useful. My standard way of rolling patches has long been

cp -al foo foo-orig
[edit foo like crazy]
diff -urN foo-orig foo

but this means relying on move-file-out-of-the-way semantics in your editor, whcih is hardly reliable.

I was thinking of implementing this myself: it's nice to see someone else doing the same.

(And, FWIW, I agree with Linus: *lots* of apps use (dev, inum) pair identity to determine file identity; it's an important property that shouldn't be broken. inums remaining unchanged, though also an important invariant, isn't as heavily relied upon, so breaking it for cowlinks seems to be the lowest-impact implementation.)


(Log in to post comments)

COW Links

Posted May 13, 2004 4:35 UTC (Thu) by elanthis (subscriber, #6227) [Link]

apps that rely on stable inode numbers are broken. many filesystems cannot give this guarantee
across file accesses (they stay the same between open() and close(), but not otherwise). gnu
arch, for example, uses inode numbers for "validity" checking, and as a consequence breaks very
often on common file systems, such as NFS.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds