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] Re: [patch] xen-blkback: sync I/O after backend disconne

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [patch] xen-blkback: sync I/O after backend disconnected
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 15 Aug 2011 11:10:42 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jens Axboe <jaxboe@xxxxxxxxxxxx>, Greg Marsden <greg.marsden@xxxxxxxxxx>, Joe Jin <joe.jin@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Kurt C Hackel <KURT.HACKEL@xxxxxxxxxx>
Delivery-date: Mon, 15 Aug 2011 08:13:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110815144610.GA3707@xxxxxxxxxxxxx>
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>
References: <4E48A6A6.4040706@xxxxxxxxxx> <20110815144610.GA3707@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Aug 15, 2011 at 10:46:10AM -0400, Christoph Hellwig wrote:
> On Mon, Aug 15, 2011 at 12:55:02PM +0800, Joe Jin wrote:
> > When backend disconnect, sync IO requests to the disk.
> 
> Care to explain why?

I was thinking it might be a good idea to do that when a disk
(file, LVM, real block device) is released from a guest just in case
there is some outstanding I/Os. But then I realized that we
bypasses the page cache anyhow - so there should be no outstanding I/O
requests - unless they are in the disk queue.

And the guest would normally issues a FLUSH when unmounting the
disk. Hm, I wonder what the conditions are when we forcibly kill the
guest - there might be outstanding I/Os in the disk's cache -
at which point we should probably sync the write cache, no?

> 
> Also you'll just need a sync_blockdev, fsync_bdev does far to many
> things that don't make any sense when you don't have a file system
> mounted on a device.
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

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