[PATCH] ext3: dynamic allocation of block reservation info
commit1f374d8cc10fd9932359bf5928ed04bdbeca97b1
authorMingming Cao <cmm@us.ibm.com>
Mon, 4 Apr 2005 00:39:16 +0000 (3 17:39 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 4 Apr 2005 00:39:16 +0000 (3 17:39 -0700)
tree4d2dd97da5af8989d150f76a98fff2e3203945bb
parentd0091e60a7e122b3e70658bf6e1148a389f71e90
[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>
fs/ext3/balloc.c
fs/ext3/ialloc.c
fs/ext3/inode.c
fs/ext3/ioctl.c
fs/ext3/super.c
include/linux/ext3_fs.h
include/linux/ext3_fs_i.h