All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] gfs2: Return all reservations when rgrp_brelse is called
Date: Fri, 13 Jul 2018 16:26:27 -0400 (EDT)	[thread overview]
Message-ID: <963882949.50535174.1531513587686.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <224749285.50534453.1531513566639.JavaMail.zimbra@redhat.com>

Hi,

Before this patch, function gfs2_rgrp_brelse would release its
buffer_heads for the rgrp bitmaps, but it did not release its
reservations. The problem is: When we need to call brelse, we're
basically letting go of the bitmaps, which means our reservations
are no longer valid: someone on another node may have reserved those
blocks and even used them. This patch makes the function returns all
the block reservations held for the rgrp whose buffer_heads are
being released.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
 fs/gfs2/rgrp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 7e22918d32d6..9348a18d56b9 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1263,6 +1263,7 @@ void gfs2_rgrp_brelse(struct gfs2_rgrpd *rgd)
 {
 	int x, length = rgd->rd_length;
 
+	return_all_reservations(rgd);
 	for (x = 0; x < length; x++) {
 		struct gfs2_bitmap *bi = rgd->rd_bits + x;
 		if (bi->bi_bh) {



       reply	other threads:[~2018-07-13 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <224749285.50534453.1531513566639.JavaMail.zimbra@redhat.com>
2018-07-13 20:26 ` Bob Peterson [this message]
2018-07-13 21:19   ` [Cluster-devel] [GFS2 PATCH] gfs2: Return all reservations when rgrp_brelse is called Steven Whitehouse
2018-07-23 15:29     ` Bob Peterson
2018-07-23 16:52       ` 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=963882949.50535174.1531513587686.JavaMail.zimbra@redhat.com \
    --to=rpeterso@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.