Skip to contentSkip to conversation

GFS2: Implement a "bitmap has no extents longer than X" scheme

PATCH New Bob Peterson 1 participant 1 message Nov 4, 2013 1 message not in the archive GFS2 file system

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 GFS2: Implement a "bitmap has no extents longer than X" scheme

In reply to a message not in the archive

Hi,

Before this patch, we used a bit, GBF_FULL, to determine when a bitmap was full. With the preceding patch, we started accepting block reservations smaller than the ideal size, which requires a lot more parsing of the bitmaps. To reduce the amount of bitmap searching, this patch implements a scheme whereby each rgrp keeps track of the point at this multi-block reservations will fail.

Regards,

Bob Peterson
Red Hat File Systems

---

fs/gfs2/incore.h +1 -1
index ba1ea67..48c1a85 100644
@@ -68,7 +68,6 @@ struct gfs2_log_operations {
 struct gfs2_bitmap {
 	struct buffer_head *bi_bh;
 	char *bi_clone;
-	unsigned long bi_flags;
 	u32 bi_offset;
 	u32 bi_start;
 	u32 bi_len;
@@ -93,6 +92,7 @@ struct gfs2_rgrpd {
 	struct gfs2_rgrp_lvb *rd_rgl;
 	u32 rd_last_alloc;
 	u32 rd_flags;
+	u32 rd_extfail_pt;		/* extent failure point */
 #define GFS2_RDF_CHECK		0x10000000 /* check for unlinked inodes */
 #define GFS2_RDF_UPTODATE	0x20000000 /* rg is up to date */
 #define GFS2_RDF_ERROR		0x40000000 /* error in rg */
fs/gfs2/lops.c +1 -1
index 010b9fb..e615021 100644
@@ -81,8 +81,8 @@ static void maybe_release_space(struct gfs2_bufdata *bd)
 		gfs2_rgrp_send_discards(sdp, rgd->rd_data0, bd->bd_bh, bi, 1, NULL);
 	memcpy(bi->bi_clone + bi->bi_offset,
 	       bd->bd_bh->b_data + bi->bi_offset, bi->bi_len);
-	clear_bit(GBF_FULL, &bi->bi_flags);
 	rgd->rd_free_clone = rgd->rd_free;
+	rgd->rd_extfail_pt = rgd->rd_free;
 }
 
 /**
fs/gfs2/rgrp.c +27 -27

143 lines not on this page · raw message