GFS2: If we use up our block reservation, request more next time
If we run out of blocks for a given multi-block allocation, we obviously did not reserve enough. We should reserve more blocks for the next reservation to reduce fragmentation. This patch increases the size hint for reservations when they run out. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:

committed by
Steven Whitehouse

parent
33ad5d5428
commit
1a8550332a
@@ -2251,6 +2251,9 @@ static void gfs2_adjust_reservation(struct gfs2_inode *ip,
|
||||
trace_gfs2_rs(rs, TRACE_RS_CLAIM);
|
||||
if (rs->rs_free && !ret)
|
||||
goto out;
|
||||
/* We used up our block reservation, so we should
|
||||
reserve more blocks next time. */
|
||||
atomic_add(RGRP_RSRV_ADDBLKS, &rs->rs_sizehint);
|
||||
}
|
||||
__rs_deltree(rs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user