Chinaunix首页 | 论坛 | 博客
  • 博客访问: 346170
  • 博文数量: 168
  • 博客积分: 6895
  • 博客等级: 准将
  • 技术积分: 1726
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-12 23:01
文章分类

全部博文(168)

文章存档

2011年(6)

2010年(162)

我的朋友

分类: 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.
阅读(338) | 评论(0) | 转发(0) |
0

上一篇:i love kernelers.

下一篇:begin hacking a fs

给主人留下些什么吧!~~