diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 12:09:15 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-12 12:09:15 -0400 |
commit | e90c01e148b967d30caf59e76accb3a58ca6b74b (patch) | |
tree | 92f9b45febbdbc52174307e2e73dbb26aa893465 /fs/gfs2/format.h | |
parent | 7d63b54a65ce902f9aaa8efe8192aa3b983264d4 (diff) |
[GFS2] Reverse block order in build_height
The original code ordered the blocks allocated in the build_height
routine backwards causing excessive disk seeks during a read of the
metadata. This patch reverses the order to try and reduce disk seeks.
Example: A five level metadata tree, I = Inode, P = Pointers, D = Data
You need to read the blocks in the order:
I P5 P4 P3 P2 P1 D
in order to read a single data block. The new code now orders the blocks
in this way. The old code used to order them as:
I P1 P2 P3 P4 P5 D
requiring two extra seeks on average. Note that for files which are
grown by gradual extension rather than by truncate or by llseek/write
at a large offset, this doesn't apply. In the case of writing to a
file linearly, this routine will only be called upon to extend the
height of the tree by one block at a time, so the ordering is
determined by when its called rather than by the internals of the
routine itself. Optimising that part of the ordering is a much
harder problem.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/format.h')
0 files changed, 0 insertions, 0 deletions