[Top] [All Lists]

Re: Zero-copy Block IO with XFS

To: Matthew Hodgson <matthew@xxxxxxxxxxxxx>
Subject: Re: Zero-copy Block IO with XFS
From: David Chinner <dgc@xxxxxxx>
Date: Wed, 12 Dec 2007 22:07:35 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <475E76AB.705@mxtelecom.com>
References: <475E76AB.705@mxtelecom.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/
On Tue, Dec 11, 2007 at 11:38:19AM +0000, Matthew Hodgson wrote:
> Hi all,
> I'm experimenting with using XFS with a network block device (DST), and 
> have come up against the problem that when writing data to the network, 
> it uses kernel_sendpage to hand the page presented at the BIO layer to 
> the network stack.  It then completes the block IO request.
> The problem arises when XFS proceeds to then reuse that page before the 
> NIC actually sends it.

Where does XFS overwrite a page while I/O is still in progress?
Stack trace please.

> Particularly if TX checksumming or TCP 
> segmentation is being offloaded to the NIC, it seems that the NIC will 
> try to access to page after the BIO request has returned, and so operate 
> on stale data. 

That sounds like you are completing the bio before the I/O has
really been completed. Basically, the bio can't be completed until
the data has been sent and that will prevent any use after free or
overwrite of the data while it is being sent...


Dave Chinner
Principal Engineer
SGI Australian Software Group

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