From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 30 Jul 2013 15:18:30 +0100 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Delete directory block reservation on failure In-Reply-To: <1521672306.1289505.1375193684707.JavaMail.root@redhat.com> References: <1521672306.1289505.1375193684707.JavaMail.root@redhat.com> Message-ID: <1375193910.2725.27.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On Tue, 2013-07-30 at 10:14 -0400, Bob Peterson wrote: > Hi, > > This patch adds one line of code that deletes a block reservation > structure for the source directory in the event that the inode creation > operation fails. If the inode creation succeeds, the reservation will > be deleted anyway, since directory reservations are now only 1 block. > Why would we want to do that? If the creation has failed then that gives us no information about whether further allocations are likely to be made for that directory, Steve. > Regards, > > Bob Peterson > Red Hat File Systems > > Signed-off-by: Bob Peterson > --- > diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c > index a01b8fd..371e4e3 100644 > --- a/fs/gfs2/inode.c > +++ b/fs/gfs2/inode.c > @@ -715,6 +715,7 @@ fail_free_inode: > free_inode_nonrcu(inode); > inode = NULL; > fail_gunlock: > + gfs2_rs_delete(dip); > gfs2_glock_dq_uninit(ghs); > if (inode && !IS_ERR(inode)) { > clear_nlink(inode); >