diff options
author | Bob Peterson <rpeterso@redhat.com> | 2012-12-20 13:23:04 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-01-02 10:05:27 +0000 |
commit | 13d2eb012927b03ac1b80202af5aa9abc4003bd5 (patch) | |
tree | e2145f0cdd69a53edeb915efd9712e2ebba19f45 /lib/fdt_rw.c | |
parent | 15bd50ad82a6d3421af1abe82e2554898abc4141 (diff) | |
download | linux-3.10-13d2eb012927b03ac1b80202af5aa9abc4003bd5.tar.gz linux-3.10-13d2eb012927b03ac1b80202af5aa9abc4003bd5.tar.bz2 linux-3.10-13d2eb012927b03ac1b80202af5aa9abc4003bd5.zip |
GFS2: Reset rd_last_alloc when it reaches the end of the rgrp
In function rg_mblk_search, it's searching for multiple blocks in
a given state (e.g. "free"). If there's an active block reservation
its goal is the next free block of that. If the resource group
contains the dinode's goal block, that's used for the search. But
if neither is the case, it uses the rgrp's last allocated block.
That way, consecutive allocations appear after one another on media.
The problem comes in when you hit the end of the rgrp; it would never
start over and search from the beginning. This became a problem,
since if you deleted all the files and data from the rgrp, it would
never start over and find free blocks. So it had to keep searching
further out on the media to allocate blocks. This patch resets the
rd_last_alloc after it does an unsuccessful search at the end of
the rgrp.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'lib/fdt_rw.c')
0 files changed, 0 insertions, 0 deletions