支持目录硬链接的文件系统
有人知道吗?最好用linux实现?
或者,有人知道将其添加到任何开源实现中需要付出多少努力吗? (我的意思是:也许改变一个 if 语句就足够了,也许我必须仔细检查整个 fs 实现添加测试;你有这个想法吗?)。
谢谢....
Does anybody know one? preferrably with linux implementation?
alternatively, does anybody know how much effort would it take to add it in any open-source implementation? (i mean: maybe it's enough to change an if statement, maybe i have to go carefully trhough the whole fs implementation adding tests; do you have that notion? ).
thanks....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HFS+ 允许 OSX 10.5 中的目录硬链接。从 OSX 10.6 开始,只有 TimeMachine 可以创建它们,并且 HFS+ 会进行一些健全性检查,确保它们不会引入循环。
但是,Linux 不会读取它们。除了文件系统之外,这还可以在 VFS 层强制执行。即使没有循环,一些用户空间工具也依赖于没有目录硬链接(例如,GNU find 优化可以让它跳过许多目录;可以使用 -noleaf 禁用它)。
HFS+ allows directory hardlinks in OSX 10.5. Only TimeMachine can create them since OSX 10.6, and HFS+ does some sanity checking that they do not introduce cycles.
However, Linux will not read them. Besides filesystems, this could be enforced at the VFS layer. Even if there are no cycles, some userspace tools rely on having no directory hard links (eg, a GNU find optimisation that lets it skip many directories; it can be disabled with -noleaf ).
从技术上讲,没有什么可以阻止您使用十六进制编辑器打开 /dev/sda 并创建一个。然而,如果你这样做,你系统中的其他一切都会崩溃。
我能找到的最好的解释是来自 jta 的引用:
Technically nothing keeps you from opening /dev/sda with a hex editor and creating one. However everything else in your system will fall apart if you do.
The best explanation i could find is this quote from jta: