[Cluster-devel] [GFS2 PATCH 4/4] GFS2: If we use up our block reservation, request more next time
Bob Peterson
rpeterso at redhat.com
Mon Oct 20 16:37:09 UTC 2014
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.
---
fs/gfs2/rgrp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 50cdba2..265fbab 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -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_MINBLKS, &rs->rs_sizehint);
}
__rs_deltree(rs);
}
--
1.9.3
More information about the Cluster-devel
mailing list