From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 03/25] vfs: split __dentry_open() Date: Mon, 26 Mar 2012 09:30:28 -0400 Message-ID: <20120326133028.GA8436@infradead.org> References: <1331155362-11132-1-git-send-email-miklos@szeredi.hu> <1331155362-11132-4-git-send-email-miklos@szeredi.hu> <20120324141251.GA25980@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Trond.Myklebust@netapp.com, sfrench@samba.org, sage@newdream.net, ericvh@gmail.com, mszeredi@suse.cz To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Mar 26, 2012 at 03:22:09PM +0200, Miklos Szeredi wrote: > > I think the O_DIRECT checks should move out of the VFS. ??The direct I/O > > method isn't called from the VFS anywhere, but just from the > > generic_file_* routines in filemap.c, which suggest doing the O_DIRECT > > check in there as well. > > Returning the error at the earliest opportunity (from open as opposed > to read/write) makes sense. Given that some apps may actually rely on > the return value from open to verify O_DIRECT support, it doesn't seem > to be a good idea to move the checks to read/write. I'm fine with keeping it in open, bu it should be in generic_file_open, not in the VFS (and yeah, generic_file_open is in open.c not filemap.c where it should be, sorry)