Write a simple FUSE filesystem that is stored in memory. The filesystem has to support the following commands:
ls, mkdir, cp
这个问题最近在面试中被问到,我无法回答。 所以我决定学习它。
做了一些搜索并找到了一些关于构建我自己的 FUSE 文件系统的指南。 我真的不知道如何在内存中实现文件系统。
我的问题是
- 我的方向是否正确?
- 我还应该阅读哪些内容?
- 解决方案是什么?
我正在阅读的链接:
- http://fuse.sourceforge.net/
- http://www.ibm.com/developerworks/linux/library/l-fuse/
- http://pramode.net/articles/lfy/fuse/pramode.html
- http://revista.python.org.ar/3/en/html/python_en_tu_fs.html
- http://pysnippet.blogspot.com/2009/11/fuse-filesystem-in-userspace-part-1.html
- creating a temporary file in python with FUSE
- http://www.willmcgugan.com/blog/tech/2011/3/20/creating-a-virtual-filesystem-with-python-and-why-you-need-one/
在最后一个链接中提到了内存缓存 PyFileSystem . 我不确定这有什么帮助。
PS:这是一个书面面试问题,所以答案必须足够简单,可以在 10-15 分钟内写在纸上。
最佳答案
我上过一门类(class),我们必须构建一个设计类似于 Frangipani 的内存分布式文件系统。 .该类(class)深受 MIT's Distributed Systems course 启发。 .完成他们最初的几项实验室作业将是一个很好的练习。
This tutorial也挺有帮助的。
关于linux - 内存中的 FUSE 文件系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9003351/