lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110822143829.GA2056@infradead.org>
Date:	Mon, 22 Aug 2011 10:38:29 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Joe Jin <joe.jin@...cle.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Jens Axboe <jaxboe@...ionio.com>,
	Ian Campbell <Ian.Campbell@...citrix.com>,
	Greg Marsden <greg.marsden@...cle.com>,
	Kurt C Hackel <KURT.HACKEL@...cle.com>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [patch] xen-blkback: sync I/O after backend disconnected

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ