From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Fri, 13 Apr 2012 11:17:13 +0100 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Fold quota data into the reservations struct In-Reply-To: <37c6c80d-4c7e-4def-8e62-78b67dd259aa@zmail12.collab.prod.int.phx2.redhat.com> References: <37c6c80d-4c7e-4def-8e62-78b67dd259aa@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <1334312233.2746.8.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 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 > -- > Author: Bob Peterson > 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.