From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:41181 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbcGLMAw (ORCPT ); Tue, 12 Jul 2016 08:00:52 -0400 Date: Tue, 12 Jul 2016 05:00:51 -0700 From: Christoph Hellwig To: Ilya Lantukh Cc: linux-fsdevel@vger.kernel.org Subject: Re: aio: Question about durability guarantees Message-ID: <20160712120051.GA690@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jul 12, 2016 at 12:42:28PM +0300, Ilya Lantukh wrote: > Hi all, > > We are considering to use libaio in our project as an optional > alternative to Java NIO. Our goal is to improve performance while > maintaining durability. > > We have performed tests on different storage devices. Files were > opened with flags: O_WRONLY | O_DIRECT | O_DSYNC. However, on some SSD > devices O_DSYNC causes io_submit() to block until operation is > finished, which is not acceptable in our case. What is your exact setup? Sounds like you're using a file system and not a block device node. Which filesystem shows this behavior? > > The question is: do libaio writes with only WRONLY | O_DIRECT flags > provide any durability guarantees? No, they don't, you need O_DSYNC for that.