cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [RFC 05/17] Revert "gfs2: Don't reject a supposedly full bitmap if we have blocks reserved"
Date: Wed, 14 Oct 2020 11:58:21 +0200	[thread overview]
Message-ID: <20201014095833.1035870-6-agruenba@redhat.com> (raw)
In-Reply-To: <20201014095833.1035870-1-agruenba@redhat.com>

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 <agruenba@redhat.com>
---
 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



  parent reply	other threads:[~2020-10-14  9:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  9:58 [Cluster-devel] [RFC 00/17] gfs2: resource group glock sharing Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 01/17] gfs2: Turn gfs2_rbm_incr into gfs2_rbm_add Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 02/17] gfs2: Only use struct gfs2_rbm for bitmap manipulations Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 03/17] gfs2: Get rid of unnecessary variable in gfs2_alloc_blocks Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 04/17] gfs2: Minor gfs2_inplace_reserve cleanup Andreas Gruenbacher
2020-10-14  9:58 ` Andreas Gruenbacher [this message]
2020-10-14  9:58 ` [Cluster-devel] [RFC 06/17] gfs2: Don't clear GBF_FULL flags in rs_deltree Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 07/17] gfs2: Set GBF_FULL flags when reading resource groups Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 08/17] gfs2: When looking for blocks to allocate, don't clamp at free blocks Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 09/17] gfs2: Also reflect single-block allocations in rgd->rd_extfail_pt Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 10/17] gfs2: Only pass reservation down to gfs2_rbm_find Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 11/17] gfs: Don't search for unreserved space twice Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 12/17] gfs2: Add per-reservation reserved block accounting Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 13/17] gfs2: Add local resource group locking Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 14/17] gfs2: Allow node-wide exclusive glock sharing Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 15/17] gfs2: Use resource group " Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 16/17] gfs2: Limit the maximum amount of reserved space Andreas Gruenbacher
2020-10-14  9:58 ` [Cluster-devel] [RFC 17/17] gfs2: Rename rs_free to rs_wanted Andreas Gruenbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201014095833.1035870-6-agruenba@redhat.com \
    --to=agruenba@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).