Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4837143imj; Wed, 13 Feb 2019 01:50:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IYJwJN/Wha6RPcDBU452E1woXDgHF1hs/FEi/rPmytLZvbWPPos39QkzMuWpiXKFSku9mbH X-Received: by 2002:a63:555b:: with SMTP id f27mr8040485pgm.313.1550051457205; Wed, 13 Feb 2019 01:50:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550051457; cv=none; d=google.com; s=arc-20160816; b=thPRwhrqTcHZh/+o4xekKIY2w0QiHWkanD/tHkeeubAcGiCFV8X7k2+AI8s1xFEdZP eC9AivULeiTaBD8VvGuNX0lleAF96Xhor/VMTydOCC6sqZLbjgwAbuIHy2snOI7AugoL t55xvTMhMCPNXPHiRIRwedK+vTBoi5RJxr6MxoSA85SWEorD6ouyey4RFhPC+T5S5VsN 0wJ5ar1Gjumjvzm5caO2W2RCXjBWU+hkq17i+w4AV9pccidOAtcy8zI8sLA0AI3gbcyf Adu7LVZFCz+cuJsJwgWhVabaHvJBa1qo/0i3hZYmeyBSqF2eCFV31SYSgCBbodMVapHu bj6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=5bGXMNNfS/iQ0syuOE5kPwVrbTafOtjxSd9KSjR67rw=; b=L97emWx67maHQSaqrQnTIVhx6UBvWIEwPtYDYJrXZNBBvvWRLDOxmx+TindQs50n3y a2Z7XlWcIXTx4M6vxuIhK9s7vnDeDBZawZ41+0byXUcsfu3i5wKHUeOshuSnp9Ajy/rP 0LT7TGD91PNZsyVQgthmrOeXW/p3fPUsr7Z/ZbNiaCb0tEd6uGKTltza2lhurlITUxET V6KkrfUCTSVHjkKnmVJDqWoIBTCg45sk8l7S0m33cykeznuXJMge9XOLJb6kxPJpyVgE iWtTz2sqbsakvEdjQPH7j+pj+uMY0OhfShGRGReQ5wBpaARlfEsWmMLbnoLxM//ZOHbH IY4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z31si10538520plb.402.2019.02.13.01.50.41; Wed, 13 Feb 2019 01:50:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387486AbfBMGum (ORCPT + 99 others); Wed, 13 Feb 2019 01:50:42 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:33936 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387415AbfBMGum (ORCPT ); Wed, 13 Feb 2019 01:50:42 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 37FC27C7F29C73C27772; Wed, 13 Feb 2019 14:50:38 +0800 (CST) Received: from [127.0.0.1] (10.177.31.14) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.408.0; Wed, 13 Feb 2019 14:50:33 +0800 Subject: Re: [PATCH] fat: enable .splice_write to support splice on O_DIRECT file To: , , References: <20190210094754.56355-1-houtao1@huawei.com> From: Hou Tao Message-ID: <05d7e682-1b49-2f9e-37f8-8de1401eeece@huawei.com> Date: Wed, 13 Feb 2019 14:50:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20190210094754.56355-1-houtao1@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.14] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping ? On 2019/2/10 17:47, Hou Tao wrote: > 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 > --- > 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, > }; > >