From: Andreas Gruenbacher Date: Wed, 14 Oct 2020 11:58:21 +0200 Subject: [Cluster-devel] [RFC 05/17] Revert "gfs2: Don't reject a supposedly full bitmap if we have blocks reserved" In-Reply-To: <20201014095833.1035870-1-agruenba@redhat.com> References: <20201014095833.1035870-1-agruenba@redhat.com> Message-ID: <20201014095833.1035870-6-agruenba@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This reverts commit e79e0e1428188b24c3b57309ffa54a33c4ae40c4. It turns out that we're only setting the GBF_FULL flag of a bitmap if we've been scanning from the beginning of the bitmap until the end and we haven't found a single free block, and that blocks are only marked as allocated when they are allocated, no when they are merely reserved. This means that independent of any reservations, we can skip skip bitmaps with the GBF_FULL flag set in gfs2_rbm_find. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/rgrp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 6c246bf7eada..dbb0bcf48078 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1751,8 +1751,7 @@ static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, while(1) { bi = rbm_bi(rbm); - if ((ip == NULL || !gfs2_rs_active(&ip->i_res)) && - test_bit(GBF_FULL, &bi->bi_flags) && + if (test_bit(GBF_FULL, &bi->bi_flags) && (state == GFS2_BLKST_FREE)) goto next_bitmap; -- 2.26.2