GFS2: reread rindex when necessary to grow rindex
authorBenjamin Marzinski <bmarzins@redhat.com>
Tue, 30 Nov 2010 15:38:35 +0000 (09:38 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 30 Nov 2010 15:34:18 +0000 (15:34 +0000)
commit0489b3f5eba735413ccedd425651cf41d6b1f7c5
tree08f09b54c4ec3f6f42fcfe83d435f6023e0eb386
parent0b1246e6776c79719ff4a3afd9c38fba99b99d5a
GFS2: reread rindex when necessary to grow rindex

When GFS2 grew the filesystem, it was never rereading the rindex file during
the grow. This is necessary for large grows when the filesystem is almost full,
and GFS2 needs to use some of the space allocated earlier in the grow to
complete it.  Now, if GFS2 fails to reserve the necessary space and the rindex
file is not uptodate, it rereads it.  Also, the only difference between
gfs2_ri_update() and gfs2_ri_update_special() was that gfs2_ri_update_special()
didn't clear out the existing resource groups, since you knew that it was only
called when there were no resource groups.  Attempting to clear out the
resource groups when there are none takes almost no time, and rarely happens,
so I simply removed gfs2_ri_update_special().

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/rgrp.c