| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/9] xfs: convert internal buffer functions to pass maps |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Wed, 20 Jun 2012 02:48:24 -0400 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1339133914-11148-3-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1339133914-11148-1-git-send-email-david@xxxxxxxxxxxxx> <1339133914-11148-3-git-send-email-david@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
> +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)
Also any reason for the underscore in the naming?
> + 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.
> + 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.
|
| Previous by Date: | Re: [PATCH 2/9] xfs: convert internal buffer functions to pass maps, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH 3/9] xfs: add discontiguous buffer map interface, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 2/9] xfs: convert internal buffer functions to pass maps, Ben Myers |
| Next by Thread: | Re: [PATCH 2/9] xfs: convert internal buffer functions to pass maps, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |