xfs
[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 1/3] xfs: use b_maps[] for discontiguous buffers
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Fri, 30 Nov 2012 11:55:08 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121130160920.GA9873@xxxxxxxxxxxxx>
References: <20121128222309.109033307@.sgi.com> <20121128222622.688093599@xxxxxxx> <20121130160920.GA9873@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 11/30/12 10:09, Christoph Hellwig wrote:
  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.


eeek. yep, I will loop through and count the pages needed in each
segment.

--Mark.

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