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 0/6] xenblk: Add O_DIRECT and O_SYNC support.

To: Joe Jin <joe.jin@xxxxxxxxxx>
Subject: Re: [Xen-devel] [patch 0/6] xenblk: Add O_DIRECT and O_SYNC support.
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 05 Nov 2008 09:08:25 +0000
Cc: Xen-Devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Kurt Hackel <kurt.hackel@xxxxxxxxxx>, Greg Marsden <greg.marsden@xxxxxxxxxx>, Wen Gang Wang <wen.gang.wang@xxxxxxxxxx>, Jens Axboe <jens.axboe@xxxxxxxxxx>, Shinya Narahara <shinya.narahara@xxxxxxxxxx>
Delivery-date: Wed, 05 Nov 2008 01:08:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <53f6a65d-b8f3-477d-9e00-fbe29880d739@default>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack/Jg8ETaCnYqsZEd2X2wAWy6hiGQ==
Thread-topic: [Xen-devel] [patch 0/6] xenblk: Add O_DIRECT and O_SYNC support.
User-agent: Microsoft-Entourage/11.4.0.080122
On 5/11/08 08:16, "Joe Jin" <joe.jin@xxxxxxxxxx> wrote:

>> What's the vbd type in this case: raw partition, lvm, qcow file, ...?
> 
> Raw partition, crashed/power outage, lots of data lost :(
> 
>> The existing BLKIF_OP_WRITE_BARRIER and BLKIF_OP_FLUSH_DISKCACHE should
>> suffice to implement O_SYNC on the blkfront side, I think. O_DIRECT doesn't
>> mean writes are synchronous to the platters -- just means the buffer cache
>> is bypassed -- which should generally be the case on the blkback side always
>> anyway.
> 
> However, frontend driver could not got the write's flag at all.
> if we could know the request with O_SYNC flag should be easy to handle,
> need not touch filesystem layer.

So what does O_SYNC mean to Linux then? If it's not passed down to the
blkdev layer then it can only mean that requests must be synchronously
committed as far as that layer. I would therefore imagine you could lose as
much data natively as you do running on Xen. Where are these megabytes of
data sitting when they get lost, and why does it not happen when running
natively? If O_SYNC is not waiting for completion responses from the block
layer, that's a limitation of Linux's generic block subsystem, isn't it?

 -- Keir

> O_DIRECT is difference not only buffer head, if read/write is direct-io,
> need to commit request as soon as possible, means unplug request_queue
> if request with O_DIRECT flag(request should be marked REQ_RW_SYNC
> flag).



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

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