]> git.baikalelectronics.ru Git - kernel.git/commit
[GFS2] Streamline indirect pointer tree height calculation
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 28 Jan 2008 10:37:35 +0000 (10:37 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 31 Mar 2008 09:39:46 +0000 (10:39 +0100)
commitec6ae6cc64be3d6a0f72b616aae94932ab3023de
tree51b1af9b58dfcf1b561888a6752255ac86070808
parentec5a227c0e51cb691f74d8ff8bc24bd5daed6e22
[GFS2] Streamline indirect pointer tree height calculation

This patch improves the calculation of the tree height in order to reduce
the number of operations which are carried out on each call to gfs2_block_map.
In the common case, we now make a single comparison, rather than calculating
the required tree height from scratch each time. Also in the case that the
tree does need some extra height, we start from the current height rather from
zero when we work out what the new height ought to be.

In addition the di_height field is moved into the inode proper and reduced
in size to a u8 since the value must be between 0 and GFS2_MAX_META_HEIGHT (10).

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/bmap.c
fs/gfs2/incore.h
fs/gfs2/inode.c
fs/gfs2/inode.h
fs/gfs2/super.c