From: Jan Kara Subject: Re: [PATCH v7 05/14] ext4, dax: introduce ext4_dax_aops Date: Thu, 29 Mar 2018 17:40:35 +0200 Message-ID: <20180329154035.lvsepjvt6vcplshw@quack2.suse.cz> References: <152167302988.5268.4370226749268662682.stgit@dwillia2-desk3.amr.corp.intel.com> <152167305782.5268.13485258587227210521.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jan Kara , linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andreas Dilger , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Theodore Ts'o , linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hch-jcswGhMUV9g@public.gmane.org To: Dan Williams Return-path: Content-Disposition: inline In-Reply-To: <152167305782.5268.13485258587227210521.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" List-Id: linux-ext4.vger.kernel.org On Wed 21-03-18 15:57:37, Dan Williams wrote: > In preparation for the dax implementation to start associating dax pages > to inodes via page->mapping, we need to provide a 'struct > address_space_operations' instance for dax. Otherwise, direct-I/O > triggers incorrect page cache assumptions and warnings. > > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: Jan Kara > Signed-off-by: Dan Williams Looks good, just one nit below. > @@ -3946,6 +3961,13 @@ static const struct address_space_operations ext4_da_aops = { > .error_remove_page = generic_error_remove_page, > }; > > +static const struct address_space_operations ext4_dax_aops = { > + .direct_IO = ext4_direct_IO, So ext4_direct_IO() for IS_DAX() files will just bail out. So could you just provide ext4_dax_direct_IO() which will bail out and use it here? With a similar comment as in xfs_vm_direct_IO() that open still needs this method set... Thanks! Honza -- Jan Kara SUSE Labs, CR