xfs
[Top] [All Lists]

Re: [PATCH 5/8] xfs: add DAX file operations support

To: Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: [PATCH 5/8] xfs: add DAX file operations support
From: Boaz Harrosh <boaz@xxxxxxxxxxxxx>
Date: Thu, 16 Apr 2015 12:33:26 +0300
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, willy@xxxxxxxxxxxxxxx, jack@xxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1427194266-2885-6-git-send-email-david@xxxxxxxxxxxxx>
References: <1427194266-2885-1-git-send-email-david@xxxxxxxxxxxxx> <1427194266-2885-6-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
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);
>  
<>

<Prev in Thread] Current Thread [Next in Thread>