[Cluster-devel] [GFS2 PATCH] GFS2: Delete directory block reservation on failure

Steven Whitehouse swhiteho at redhat.com
Tue Jul 30 14:18:30 UTC 2013


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 <rpeterso at redhat.com> 
> ---
> 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);
> 





More information about the Cluster-devel mailing list