From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Fri, 4 May 2007 17:04:46 -0500 Subject: [Cluster-devel] [PATCH] GFS2: kernel changes to support new gfs2_grow command (Try 3) In-Reply-To: <463BAA28.7000407@redhat.com> References: <46394174.2030709@redhat.com> <20070504202317.GA16877@redhat.com> <463BAA28.7000407@redhat.com> Message-ID: <20070504220446.GA18019@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 Fri, May 04, 2007 at 04:48:24PM -0500, Robert Peterson wrote: > David Teigland wrote: > >On Wed, May 02, 2007 at 08:57:08PM -0500, Robert Peterson wrote: > >>@@ -978,18 +1038,25 @@ int gfs2_inplace_reserve_i(struct gfs2_inode *ip, > > > >>- error = gfs2_rindex_hold(sdp, &al->al_ri_gh); > >>+ /* We need to hold the rindex unless the inode we're using is > >>+ the rindex itself, in which case it's already held. */ > >>+ if (ip != GFS2_I(sdp->sd_rindex)) > >>+ error = gfs2_rindex_hold(sdp, &al->al_ri_gh); > >>+ else if (!sdp->sd_rgrps) /* We may not have the rindex read in, so: > >>*/ > >>+ error = gfs2_check_rindex_version(sdp); > >>+ > > > >I don't see why we need this change, the original looks correct. > > If we're updating through the meta_fs, the rindex file will already be > glocked and held through its inode. You don't have to worry about other holders or the state of the glock, just let gfs_rindex_hold() enqueue its own shared holder and everything should work fine.