From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH 5/8] xfs: add DAX file operations support Date: Thu, 16 Apr 2015 12:33:26 +0300 Message-ID: <552F81E6.4050700@plexistor.com> References: <1427194266-2885-1-git-send-email-david@fromorbit.com> <1427194266-2885-6-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, willy@linux.intel.com, jack@suse.cz To: Dave Chinner , xfs@oss.sgi.com Return-path: Received: from mail-wi0-f180.google.com ([209.85.212.180]:36271 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756562AbbDPJda (ORCPT ); Thu, 16 Apr 2015 05:33:30 -0400 Received: by wizk4 with SMTP id k4so187146254wiz.1 for ; Thu, 16 Apr 2015 02:33:29 -0700 (PDT) In-Reply-To: <1427194266-2885-6-git-send-email-david@fromorbit.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 03/24/2015 12:51 PM, Dave Chinner wrote: <> > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c > index 94713c2..8017175 100644 > --- a/fs/xfs/xfs_file.c > +++ b/fs/xfs/xfs_file.c > @@ -385,7 +385,11 @@ xfs_file_splice_read( > > trace_xfs_file_splice_read(ip, count, *ppos, ioflags); > > - ret = generic_file_splice_read(infilp, ppos, pipe, count, flags); > + /* for dax, we need to avoid the page cache */ > + if (IS_DAX(VFS_I(ip))) > + ret = default_file_splice_read(infilp, ppos, pipe, count, flags); > + else > + ret = generic_file_splice_read(infilp, ppos, pipe, count, flags); Dave hi Linus has accepted this patch: [be64f884be] dax: unify ext2/4_{dax,}_file_operations Which adds the same exact if(IS_DAX)) to generic_file_splice_read for use by ext2/4. (It made things easier for both ext2/4) But also this code is just fine of course Thanks Boaz > if (ret > 0) > XFS_STATS_ADD(xs_read_bytes, ret); > <>