From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] direct-io: allow file systems to do their own waiting for io Date: Mon, 3 Dec 2012 10:41:25 -0500 Message-ID: <20121203154125.GA13344@infradead.org> References: <1354541840-1483-1-git-send-email-jbacik@fusionio.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, viro@ZenIV.linux.org.uk, jmoyer@redhat.com, zab@redhat.com To: Josef Bacik Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:39650 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753172Ab2LCPl1 (ORCPT ); Mon, 3 Dec 2012 10:41:27 -0500 Content-Disposition: inline In-Reply-To: <1354541840-1483-1-git-send-email-jbacik@fusionio.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Dec 03, 2012 at 08:37:20AM -0500, Josef Bacik wrote: > Btrfs is terrible with O_DIRECT|O_SYNC, mostly because of the constant > waiting. The thing is we have a handy way of waiting for IO that we can > delay to the very last second so we do all of the O_SYNC work and then wait > for a bunch of IO to complete. So introduce a flag to allow the generic > direct io stuff to forgo waiting and leave that up to the file system. > Thanks, I don't really like passing another flag for this, if we we are going to do something like this it should be in a way where: - the actualy waiting code is a helper that btrfs would also use - the main dio code is structured in a way that we have a lower level entry point that skips the waiting, and a higher level one that also calls it. That beeing said I'm not imaginative enough to see how you're actually going to use it. Posting the btrfs side would help with that.