[Help] How to Replace File Operations in File System?

Rishi Agrawal rishi.b.agrawal at gmail.com
Mon Feb 17 03:06:49 EST 2014


Hi


On Thu, Feb 13, 2014 at 6:58 PM, freeman <freeman.zhang1992 at gmail.com>wrote:

> Hi Rishi,
>
> Thanks for your reply!
>
> I'm sorry that the description of the problem was not clear.
>
> I am writing a module(not a filesystem) to replace some operation
> pointers of Ext4.
> Just now, I try to print the dentry->name as you said. It seems
> that I'm modifying the right files.
>
> I'm wonderring if my idea is bad:
> I changed operations of a file both in ->create and ->lookup in
> inode operations of direcotry. And test the module like this:
>
> echo hello > hello      (for dir_inode->create and f->write)
> cat hello               (for f->read)
>
>
> Will the file operations be changed back?
> Or what I modified is some copies of real objects because of the
> complex caching mechanism?
>
> Regards
>
> Freeman Zhang
>
>
>

The operations will not change back until your object gets destroyed,
whatever be the type of the object.

Caching will not cause any issue here.

Maybe if you can send the code we can have a look at it.


-- 
Regards,
Rishi Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140217/72a74453/attachment.html 


More information about the Kernelnewbies mailing list