xfs
[Top] [All Lists]

Re: [PATCH v2 1/3] xfs: use b_maps[] for discontiguous buffers

To: Mark Tinguely <tinguely@xxxxxxx>
Subject: Re: [PATCH v2 1/3] xfs: use b_maps[] for discontiguous buffers
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 30 Nov 2012 11:09:20 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121128222622.688093599@xxxxxxx>
References: <20121128222309.109033307@.sgi.com> <20121128222622.688093599@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
>  use_alloc_page:
> -     start = BBTOB(bp->b_map.bm_bn) >> PAGE_SHIFT;
> -     end = (BBTOB(bp->b_map.bm_bn + bp->b_length) + PAGE_SIZE - 1)
> +     start = BBTOB(bp->b_maps[0].bm_bn) >> PAGE_SHIFT;
> +     end = (BBTOB(bp->b_maps[0].bm_bn + bp->b_length) + PAGE_SIZE - 1)

Btw, how is this logic supposed to work for discontiguous buffers?

Each of them might straddle boundaries individually, so doing the
start/end calculation for the number of pages isn't going to be correct.

<Prev in Thread] Current Thread [Next in Thread>