WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]: Make Xen 3.1 IDE flush on O_DIRECT with drive c

To: Chris Lalancette <clalance@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: Make Xen 3.1 IDE flush on O_DIRECT with drive caching off
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Tue, 26 Feb 2008 14:51:29 +0000
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 26 Feb 2008 06:51:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47C4251A.3040000@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47C4251A.3040000@xxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Tue, Feb 26, 2008 at 09:41:30AM -0500, Chris Lalancette wrote:
> All,
>      Long ago Xen added code to the device model to basically do an fsync()
> after every data write if the user in the guest specified that IDE write 
> caching
> should be disabled.  This works fine, except in the case where you are doing
> O_DIRECT writes inside the guest (ala dd if=/dev/zero of=/dev/hdb 
> oflag=direct).
>  This is because you can get out of ide_write_dma_cb() in the middle of the 
> loop
> without going through the logic to sync.  This simple patch makes sure that 
> you
> always check (and sync) inside the write callback.
> 
> This patch applies to xen-3.1-testing.hg; I still have to test 3.2 (and the 
> new
> AIO code) to see if it is affected by this bug.
> 
> Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>

  Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>

I've gone through the logic in ide_write_dma_cb() and  breaking out of the
loop is the thing todo in this scenario. The new AIO code in 3.2 looks like
it suffers from a similar problem, with one of the code paths missing the
sync due to a mis-placed label / goto pair.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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