[Top] [All Lists]

Re: [PATCH 2/9] xfs: separate buffer indexing from block map

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/9] xfs: separate buffer indexing from block map
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 26 Jun 2012 06:14:42 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1340355015-26250-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1340355015-26250-1-git-send-email-david@xxxxxxxxxxxxx> <1340355015-26250-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jun 22, 2012 at 06:50:08PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> To support discontiguous buffers in the buffer cache, we need to
> separate the cache index variables from the I/O map. While this is
> currently a 1:1 mapping, discontiguous buffer support will break
> this relationship.
> However, for caching purposes, we can still treat them the same as a
> contiguous buffer - the block number of the first block and the
> length of the buffer - as that is still a unique representation.
> Also, the only way we will ever access the discontiguous regions of
> buffers is via bulding the complete buffer in the first place, so
> using the initial block number and entire buffer length is a sane
> way to index the buffers.
> Add a block mapping vector construct to the xfs_buf and use it in
> the places where we are doing IO instead of the current
> b_bn/b_length variables.

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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