[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [GFS2 PATCH] GFS2: Fold quota data into the reservations struct



Hi,

On Thu, 2012-04-12 at 12:22 -0400, Bob Peterson wrote:
> Hi,
> 
> Several patches ago, we split the qadata structure from the reservations
> structure. Now that the previous patch lengthened the lifespan of that
> structure, we can safely fold the qadata structure back into it again.
> That saves GFS2 the work and time to allocate and deallocate the qadata
> structure, since we know quota work is normally only needed when
> allocations are done.
> 
> Regards,
> 
> Bob Peterson
> Red Hat GFS
> 
> Signed-off-by: Bob Peterson <rpeterso redhat com> 
> --
> Author: Bob Peterson <rpeterso redhat com>
> Date:   Thu Apr 12 12:11:25 2012 -0500
> 
>     GFS2: Fold quota data into the reservations struct
>     
>     This patch moves the ancillary quota data structures into the
>     block reservations structure. This saves GFS2 a lot of time and
>     effort in allocating and deallocating the qadata structure.
[snip]
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index af590de..2009c98 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -1010,25 +1010,6 @@ out:
>  }
>  
>  /**
> - * gfs2_qadata_get - get the struct gfs2_qadata structure for an inode
> - * @ip: the incore GFS2 inode structure
> - *
> - * Returns: the struct gfs2_qadata
> - */
> -
> -struct gfs2_qadata *gfs2_qadata_get(struct gfs2_inode *ip)
> -{
> -	struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
> -	int error;
> -	BUG_ON(ip->i_qadata != NULL);
> -	ip->i_qadata = kzalloc(sizeof(struct gfs2_qadata), GFP_NOFS);
> -	error = gfs2_rindex_update(sdp);
> -	if (error)
> -		fs_warn(sdp, "rindex update returns %d\n", error);
> -	return ip->i_qadata;
> -}
> -
> -/**
Does it matter that we will lose the call to gfs2_rindex_update here?

Otherwise it looks good, but I can't apply until the previous patch is
ready,

Steve.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]