Hi,

I know that topic come up before, but I have an idea how preallocation
could be implemented. Basically I want to make the mechanism in ext2
(that is only internally used for file preallocation) generally
available. I think it should be possible to split the get_block
operation into a block allocation and an inode update operation, a
generic part could manage the currently preallocated blocks as long as
the file is open. This would make it also possible to allocate/update
several blocks at once.
Anyway, while browsing through the new filesystem code and checking how
it could be done, I have a few questions. First I'd like to ask for an
explanation for the following in fs.h:struct address_space_operations

        /* Unfortunately this kludge is needed for FIBMAP. Don't use it */
        int (*bmap)(struct address_space *, long);

I ask that in the context of the fs specific functions of
read_page/write_page/prepare_write, that simply call a generic function
adding a pointer to the get_block function. If the get_block
functionality would be integrated into address_space_operations, lots of
these indirect calls could be removed. It's also make more sense this
way.
Another question, any special reason (except historical) why the
write_inode/put_inode/delete_inode/clear_inode operations are in
super_operations and not in inode_operations? They are all always called
like inode->i_sb->s_op->xxx_inode, so moving them into inode_operations
would save one indirection.

bye, Roman

Reply via email to