From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Hou Tao <houtao1@huawei.com>, <linux-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] fat: enable .splice_write to support splice on O_DIRECT file
Date: Thu, 14 Feb 2019 02:19:28 +0900 [thread overview]
Message-ID: <87wom361y7.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <871s4b7gkj.fsf@mail.parknet.co.jp> (OGAWA Hirofumi's message of "Thu, 14 Feb 2019 02:18:20 +0900")
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
> Hou Tao <houtao1@huawei.com> writes:
>
>> Now splice() on O_DIRECT-opened fat file will return -EFAULT, that is
>> because the default .splice_write, namely default_file_splice_write(),
>> will construct an ITER_KVEC iov_iter and dio_refill_pages() in dio path
>> can not handle it.
>>
>> Fix it by implementing .splice_write through iter_file_splice_write().
>>
>> Spotted by xfs-tests generic/091.
>>
>> Signed-off-by: Hou Tao <houtao1@huawei.com>
>> ---
>> fs/fat/file.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fs/fat/file.c b/fs/fat/file.c
>> index 13935ee99e1e..b3bed32946b1 100644
>> --- a/fs/fat/file.c
>> +++ b/fs/fat/file.c
>> @@ -214,6 +214,7 @@ const struct file_operations fat_file_operations = {
>> #endif
>> .fsync = fat_file_fsync,
>> .splice_read = generic_file_splice_read,
>> + .splice_write = iter_file_splice_write,
>> .fallocate = fat_fallocate,
>> };
>
> Looks good.
>
> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>
> Thanks.
Forgot to include akpm to addresses.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2019-02-13 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-10 9:47 [PATCH] fat: enable .splice_write to support splice on O_DIRECT file Hou Tao
2019-02-13 6:50 ` Hou Tao
2019-02-13 17:18 ` OGAWA Hirofumi
2019-02-13 17:19 ` OGAWA Hirofumi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wom361y7.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=houtao1@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox