xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Joe Jin <joe.jin@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Jens Axboe <jaxboe@fusionio.com>,
	Ian Campbell <Ian.Campbell@eu.citrix.com>,
	Greg Marsden <greg.marsden@oracle.com>,
	Kurt C Hackel <KURT.HACKEL@oracle.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [patch] xen-blkback: sync I/O after backend disconnected
Date: Mon, 22 Aug 2011 10:38:29 -0400	[thread overview]
Message-ID: <20110822143829.GA2056@infradead.org> (raw)
In-Reply-To: <4E4A149E.5080608@oracle.com>

On Tue, Aug 16, 2011 at 02:56:30PM +0800, Joe Jin wrote:
> On 08/15/11 22:46, 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?
> 
> When backend disconnect, I think we'd better flush all dirty data 
> to the disk ASAP.

Then please state this in the commit log, and even better the code
also.

> > 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-blkback support physical device and loopback file, so I think
> here should be fsync_bdev()? 

No, and in fact sync_blockdev is also wrong when thinking about it.
blkback always submits bios directly to the device, so flushing any
kernel caches won't do you any help.  The only thing that might make
sense to flush would be the disk write cache using a blkdev_issue_flush.

  reply	other threads:[~2011-08-22 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15  4:55 [patch] xen-blkback: sync I/O after backend disconnected Joe Jin
2011-08-15 14:46 ` Christoph Hellwig
2011-08-15 15:10   ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-08-16  6:56   ` Joe Jin
2011-08-22 14:38     ` Christoph Hellwig [this message]
     [not found]   ` <m2n.s.1QsyrJ-132485@chiark.greenend.org.uk>
2011-08-25 16:15     ` [Xen-devel] " Ian Jackson
2011-09-07 12:48       ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110822143829.GA2056@infradead.org \
    --to=hch@infradead.org \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=KURT.HACKEL@oracle.com \
    --cc=greg.marsden@oracle.com \
    --cc=jaxboe@fusionio.com \
    --cc=joe.jin@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).