全部博文(168)
分类: LINUX
2010-10-30 01:43:46
Attention: Bob is a linuxer. And he asks some questions about fs, and then Harry answered them in his opinion. Maybe they are incorrect. But u can just communicate with him so that u can be happy, just for fun and hacking. Okay, let's do it. Bob: Why should u do your fs? Harry: Well, each fs inserting into linux has its usage. So u can think if u want to achieve your thoughts u can do your fs. Of course, u can also do other things. It is free to u. Bob: What is the difference between VFS and virtual file system? Harry: Okay, VFS is a kind of virtual file system. It also has procs, sysfs, etc. VFS is a common interface to other fs. It is useful and important. Bob: How can i do my fs, give some steps, thanks. Harry: It is a good question and i will explain my points. first, do file_system_type struct, like "static struct file_system_type my_fs_type, then register_filesystem(&my_fs_type)". second, init it like "myfs_mount = vfs_kern_mount(&my_fs_type,MS_KERNMOUNT,(&my_fs_type)->name,NULL)". Before this step, u should do super_operations, inode_operations, address_space _operations, file_operations, etc. at last, do releasing the ram and unregister the fs. also, u can mount your fs to a directory and hack your thoughts. all that. Bob: Thanks for you answering! Harry: You are welcome, but i am a learner. If any question , please give me a mail.