Re: [PATCH 2/9] xfs: convert internal buffer functions to pass maps

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

 



On Wed, Jun 20, 2012 at 02:48:24AM -0400, Christoph Hellwig wrote:
> > +STATIC int
> > +_xfs_buf_get_maps(
> 
> Should this really be STATIC which prevents inlining even if the
> compiler thinks that's a good idea?  (Same for the free side)

Not really, just habit. I'll change it.

> Also any reason for the underscore in the naming?

Just that other internal functions used it. I'll remove it.

> > +	bp->b_bn = map[0].bm_bn;
> > +	bp->b_length = 0;
> > +	for (i = 0; i < nmaps; i++) {
> > +		bp->b_maps[i].bm_bn = map[i].bm_bn;
> > +		bp->b_maps[i].bm_len = map[i].bm_len;
> > +		bp->b_length += map[i].bm_len;
> > +	}
> > +	bp->b_io_length = bp->b_length;
> > +
> 
> > +	for (i = 0; i < nmaps; i++) {
> > +		numblks += map[i].bm_len;
> > +	}
> 
> no need for the curly braces here.

 ok.

> 
> > +	struct xfs_buf	*bp,
> > +	int		map,
> > +	int		*buf_offset,
> > +	int		*count,
> > +	int		rw)
> >  {
> > -	int			rw, map_i, total_nr_pages, nr_pages;
> > +	int			page_index;
> 
> The indentation for the arguments and local variables doesn't seem to
> line up here.

Oops, my bad. Will fix.

-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux