[PATCH] ext3: dynamic allocation of block reservation info

Right now the ext3 reservation structure(ext3_reserve_window_node) is part of
the ext3 inode itself.  This part of information is only needed for files that
need allocate blocks on disk.  So, the attached patches reduce the ext3 inode
size by dynamically allocating the block allocation/reservation info
structure(called struct ext3_block_alloc_info) when it is needed(i.e.  only
for files who need to allocate blocks)

The reservation structure is being allocated and linked to the ext3 inode at
  ext3_get_block_handle(), and being freed and unlinked at the
iput_final->ext3_clear_inode().

The ei->truncate_sem which is currently used to protect concurrent
ext3_get_block() and ext3_truncate is used to protect reservation structure
allocation and deallocation.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
7 files changed