Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp655706imj; Wed, 13 Feb 2019 15:06:11 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia9awvCUfC7Y66SgLmpAEgdTmVhE78Wd2W1NRkPYHsB0tSfWQKDftSe2y+RCqH27Ts0uDUA X-Received: by 2002:aa7:8c97:: with SMTP id p23mr626034pfd.229.1550099171049; Wed, 13 Feb 2019 15:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550099171; cv=none; d=google.com; s=arc-20160816; b=o6aZRUr7lNpPhPxKhmO7V1FndhPIQQUbp08wB0UbEmkwIj/1GnEXJv8mMJGHBfIe/Y W7T1q6FDKvPgH4gEZMbpL/t/c/0KdkGPzN5gkUWMDGRVYIqxf6el+17+A/5L4XbnjXP+ qZrPvUOvFi3oQhQGW6lyNPjqz4huHGK7SvxUffJfwvG+LyQkRdrUemGksN7RY1cgc1rZ QEdBQx68Ij7CxNyC2cJnb4T4Gq66f899SEgGj8YrwXgHZeB3oEfStOeJjsHzYkhmUVoy q7rx0XVsNBAnjPlY/YnaM2Yw/9GVFY1K+AT/aSVrWMGEyVz2NO6+Uf8+XWbYW3g111wS pjgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=GMx+TNmz3bTsLU4G/IcWayaRGc4/mdPzRAxJfdSkZIU=; b=ppviBiMQZ0tEmmnlC9No8GLiFClP/mgH6D+WeJS3xu7QaI+BOqwAFSNaAXBpuc5CJQ 6XMt9JXQY+ULYIbAPIsqxVYvDS3oT/jj1s8LHi1p5BF94IKBY1+Gyk2WZ6RRCv+x0XqM /a49vHenQfmCRG3GvAUSj+3qflvIXnuF+2bBG+lZ4/5H3+4Ht6KoMB9d7sCOAsiiRI5M LUymfXj635MIYn0sxjNiA3WWHBuEWcCo7evUPNIosiNQuGhbOsgtXDEKWLtkVaDVr1bq 4DueHhvDvZ/+lqwHCxX/stIpS76Ev1bnKNd9TjCbF9+D7C33bRbY4SIMXYGH5BbfUEM1 5xsg== 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 g129si561634pgc.593.2019.02.13.15.05.54; Wed, 13 Feb 2019 15:06:11 -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 S2392980AbfBMR0I (ORCPT + 99 others); Wed, 13 Feb 2019 12:26:08 -0500 Received: from mail.parknet.co.jp ([210.171.160.6]:53254 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733301AbfBMR0I (ORCPT ); Wed, 13 Feb 2019 12:26:08 -0500 X-Greylist: delayed 464 seconds by postgrey-1.27 at vger.kernel.org; Wed, 13 Feb 2019 12:26:07 EST Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id D3BFD1B404F; Thu, 14 Feb 2019 02:18:22 +0900 (JST) Received: from devron.myhome.or.jp (foobar@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.15.2/8.15.2/Debian-12) with ESMTPS id x1DHILs3019911 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 14 Feb 2019 02:18:22 +0900 Received: from devron.myhome.or.jp (foobar@localhost [127.0.0.1]) by devron.myhome.or.jp (8.15.2/8.15.2/Debian-12) with ESMTPS id x1DHILQu013012 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 14 Feb 2019 02:18:21 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.15.2/8.15.2/Submit) id x1DHIK7X013011; Thu, 14 Feb 2019 02:18:20 +0900 From: OGAWA Hirofumi To: Hou Tao Cc: , Subject: Re: [PATCH] fat: enable .splice_write to support splice on O_DIRECT file References: <20190210094754.56355-1-houtao1@huawei.com> Date: Thu, 14 Feb 2019 02:18:20 +0900 In-Reply-To: <20190210094754.56355-1-houtao1@huawei.com> (Hou Tao's message of "Sun, 10 Feb 2019 17:47:54 +0800") Message-ID: <871s4b7gkj.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hou Tao 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 > --- > 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 Thanks. -- OGAWA Hirofumi