From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 03/25] vfs: split __dentry_open() Date: Sat, 24 Mar 2012 10:12:51 -0400 Message-ID: <20120324141251.GA25980@infradead.org> References: <1331155362-11132-1-git-send-email-miklos@szeredi.hu> <1331155362-11132-4-git-send-email-miklos@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@infradead.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: <1331155362-11132-4-git-send-email-miklos@szeredi.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Mar 07, 2012 at 10:22:20PM +0100, Miklos Szeredi wrote: > From: Miklos Szeredi > > Split __dentry_open() into two functions: > > do_dentry_open() - does most of the actual work, doesn't put file on failure > open_check_o_direct() - after a successful open, checks direct_IO method > > This will allow i_op->atomic_open to do just the file initialization and leave > the direct_IO checking to the VFS. 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.