Skip to contentSkip to conversation

Hardlink Pitfalls (was: Patches for REALLY TINY 386 kernels)

DISCUSSION Al Boldi 4 participants 6 messages Jul 16, 2007 – Jul 17, 2007 VFS

lore
Share & tools
lore

Al Boldi

author
#0 lore raw
Quoted 3 lines · Satyam Sharma

Or just "cp -al" to create multiple trees at (almost) no disk cost that won't interfere with each other in any way, and makes the development process / generating patchsets trifle easier as well ...

That would be correct if hardlinks would actually do a CoW on modify, instead of misleading the user into thinking he is modifying an independent file.

Moral of the story: try to avoid hardlinks as much as possible!

Thanks!

--
Al

#1 lore raw
Quoted 7 lines · Al Boldi
Quoted 3 lines · Satyam Sharma

Or just "cp -al" to create multiple trees at (almost) no disk cost that won't interfere with each other in any way, and makes the development process / generating patchsets trifle easier as well ...

That would be correct if hardlinks would actually do a CoW on modify, instead of misleading the user into thinking he is modifying an independent file.

"patch" already handles this correctly ... and backupcopy=auto,breakhardlink in vim (and something similar in other editors I presume)

Satyam

#2 lore raw
Quoted 6 lines · Satyam Sharma
Quoted 5 lines · Al Boldi
Quoted 3 lines · Satyam Sharma

Or just "cp -al" to create multiple trees at (almost) no disk cost that won't interfere with each other in any way, and makes the development process / generating patchsets trifle easier as well ...

Quoted 6 lines
Quoted 3 lines

That would be correct if hardlinks would actually do a CoW on modify, instead
of misleading the user into thinking he is modifying an independent file.

"patch" already handles this correctly ... and backupcopy=auto,breakhardlink in vim (and something similar in other editors I presume)

Yet even a single program failing to break the link will leave you with a mess to sort out. The only place that can ensure to always break the link is the kernel. Which is why I wrote the cowlink patches some years back.

The still need a lot of love to be merge-ready. But I do use them on a daily basis.

Jörn

Signature · 6 lines
Joern's library part 2:
http://www.art.net/~hopkins/Don/unix-haters/tirix/embarrassing-memo.html
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#3 lore raw
Quoted 12 lines · Jörn Engel
Quoted 11 lines · Satyam Sharma
Quoted 9 lines · Al Boldi
Quoted 3 lines · Satyam Sharma

Or just "cp -al" to create multiple trees at (almost) no disk cost that won't interfere with each other in any way, and makes the development process / generating patchsets trifle easier as well ...

That would be correct if hardlinks would actually do a CoW on modify, instead
of misleading the user into thinking he is modifying an independent file.

Quoted 6 lines
Quoted 3 lines

"patch" already handles this correctly ... and backupcopy=auto,breakhardlink in vim (and something similar in other editors I presume)

Yet even a single program failing to break the link will leave you with a mess to sort out.

No kidding!

Quoted 3 lines

The only place that can ensure to always break the
link is the kernel. Which is why I wrote the cowlink patches some years back.

Can you post a patch against 2.6.22?

Quoted 2 lines

The still need a lot of love to be merge-ready. But I do use them on a daily basis.

Well, if the patch is lean and optional and runtime configurable, then they should definitely be considered for inclusion.

Thanks!

--
Al

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 7 lines · Al Boldi
Quoted 3 lines · Jörn Engel

The only place that can ensure to always break the
link is the kernel. Which is why I wrote the cowlink patches some years back.

Can you post a patch against 2.6.22?

I can and probably will.

Quoted 5 lines
Quoted 2 lines

The still need a lot of love to be merge-ready. But I do use them on a daily basis.

Well, if the patch is lean and optional and runtime configurable, then they should definitely be considered for inclusion.

Lean is not the word I would choose. It works. For me. That is about as much praise as it deserves.

Jörn

Signature · 7 lines
Beware of bugs in the above code; I have only proved it correct, but
not tried it.
-- Donald Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
In reply to Al Boldi
Quoted 9 lines · Al Boldi
Quoted 3 lines · Satyam Sharma

Or just "cp -al" to create multiple trees at (almost) no disk cost that won't interfere with each other in any way, and makes the development process / generating patchsets trifle easier as well ...

That would be correct if hardlinks would actually do a CoW on modify, instead of misleading the user into thinking he is modifying an independent file.

Moral of the story: try to avoid hardlinks as much as possible!

Or use a different user account.

I used to have all' Linux kernel source trees hardlinked where possible, as special user src'. So I could create a `cp -rl' copy under my own account and get an error when trying to modify a file.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds