xfs
[Top] [All Lists]

Re: [PATCH 07/10] xfs: support discontiguous buffers in the xfs_buf_log_

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 07/10] xfs: support discontiguous buffers in the xfs_buf_log_item
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Thu, 03 May 2012 14:42:12 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1335249220-22274-8-git-send-email-david@xxxxxxxxxxxxx>
References: <1335249220-22274-1-git-send-email-david@xxxxxxxxxxxxx> <1335249220-22274-8-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 04/24/12 01:33, Dave Chinner wrote:
From: Dave Chinner<dchinner@xxxxxxxxxx>

From the perspective of the log, we need to keep each segment of a
discontigous buffer in separate buffer format structures. This means log
recovery will recover all the changes on a per segment basis without
requiring any knowledge of the fact that it was logged from a
compound buffer.

To do this, we need to be able to determine what buffer segment any
given offset into the compound buffer sits over. This enables us to
translate the dirty bitmap in the number of separate buffer format
structures required.

We also need to be able to determine the number of bitmap elements
that a given buffer segment has, as this determines the size of the
buffer format structure. Hence we need to be able to determine the
both the start offset into the buffer and the length of a given
segment to be able to calculate this.

With this information, we can preallocate, build and format the
correct log vector array for each segment in a compound buffer to
appear exactly the same as individually logged buffers in the log.

Signed-off-by: Dave Chinner<dchinner@xxxxxxxxxx>


Looks good.

Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 07/10] xfs: support discontiguous buffers in the xfs_buf_log_item, Mark Tinguely <=