From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251Ab2CXONA (ORCPT ); Sat, 24 Mar 2012 10:13:00 -0400 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:53678 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961Ab2CXOM7 (ORCPT ); Sat, 24 Mar 2012 10:12:59 -0400 Date: Sat, 24 Mar 2012 10:12:51 -0400 From: Christoph Hellwig To: Miklos Szeredi 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 Subject: Re: [PATCH 03/25] vfs: split __dentry_open() 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 Content-Disposition: inline In-Reply-To: <1331155362-11132-4-git-send-email-miklos@szeredi.hu> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.