Accessing on-disk datastructures from a module

Manish Katiyar mkatiyar at gmail.com
Wed Jan 19 02:33:36 EST 2011


On Tue, Jan 18, 2011 at 11:23 PM, Martin DeMello
<martindemello at gmail.com> wrote:
> I would like to maintain some filesystem metadata as an on-disk
> datastructure that can be read and written to from within the
> filesystem module. I know file access from within the kernel is a bad
> idea; what is the recommended alternative for this?
>
> I'm thinking of reserving a bunch of blocks at the start of the
> partition and accessing them directly - is this the right approach?
> I'm not too sure how to do that either - I figured the way that ext3
> maintains its journal would provide a hint, but I can find no
> documentation on this, and the code is hard to trace through for this
> one specific thing.

You can try to have a reserved inode and use that.

-- 
Thanks -
Manish
==================================
[$\*.^ -- I miss being one of them
==================================



More information about the Kernelnewbies mailing list