From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Fri, 13 Jul 2018 22:19:17 +0100 Subject: [Cluster-devel] [GFS2 PATCH] gfs2: Return all reservations when rgrp_brelse is called In-Reply-To: <963882949.50535174.1531513587686.JavaMail.zimbra@redhat.com> References: <963882949.50535174.1531513587686.JavaMail.zimbra@redhat.com> Message-ID: <85954133-6611-1665-c0b6-d422d16f4d9c@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 13/07/18 21:26, Bob Peterson wrote: > 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. What advantage does this give us? The reservations are intended to be hints, so this should not be a problem, Steve. > 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) { >