From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Fri, 13 Jul 2018 16:26:27 -0400 (EDT) Subject: [Cluster-devel] [GFS2 PATCH] gfs2: Return all reservations when rgrp_brelse is called In-Reply-To: <224749285.50534453.1531513566639.JavaMail.zimbra@redhat.com> Message-ID: <963882949.50535174.1531513587686.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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) {