Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp412191pxu; Tue, 1 Dec 2020 14:38:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwPK7EiCEO/ViMTxIO2xUsNIHBXDXh89+zhqZ9K9ao8eT5C8WXzNMTkf7G/kBympYu9ZqI X-Received: by 2002:a17:906:2798:: with SMTP id j24mr5266742ejc.328.1606862325558; Tue, 01 Dec 2020 14:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606862325; cv=none; d=google.com; s=arc-20160816; b=uUk3KGENqMIQn7vlVyAaBE5HnWihl+7N5ZFy2b5V3HJDtW1oaCCaOGh/mxToTxxfxi oAwSTB9GA7ouJs72yfkxhiwPrAnrOQTjmwYz40Sq75HD/e9lKakVJPIjcWLNUJaMzRhQ EDdLAjnerKZSNvFqznQmKUyz860GlScPyl75vKHH/P4dXt1B3UHW3oAjuakdmqS5rC+Y bOs4/jmsS4CImiYpb0a3YQ2SN3HcPRDKks9mgZCNHtcbJf6QrAL+8nkBgXJIUkvWruQ8 quLpBZ7frd6MIh/XqiMcDDAFsfK2rUnqKtIdeouGQD/WBo836F+7MT9DkvQZC0L3Me4d CztA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4ZXOky5X68edX+ZKji8/7+h5ZsUJEEYYFZe9izZo8+w=; b=GqWIJ0d3R/VDuK+W1eDC9zgDaDznh8a1Pu5rzrVzw+JmM60WYkIE7ETjw1ErvSZAdr +aHXiSosWXKCr/JVWV+Py+kNd48ufW8QDdOWigRcuzZzl2wyc3XgnmvA0koLLVisfEqo lSNS22Sb+YTIafoiEyL02ugWYlkyJcpUsddsxC7Nc+thevbm4kVTTsHlIEByM2gG+J/q r1of7beWOrqQ+We0Cf6HZhLwIeQQNtcW8Eln2OksVtOp9cAe+AIe9v9gjjdMdn7GOWck sJxxQ79ovil2+ZwdknH8XHFFjjCoRFbZ+vmpl8jRKFLSZs7YE3Xqrq8+VtxcQmHo/5MQ +18A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=V1K25wq1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m17si825596ejq.464.2020.12.01.14.38.22; Tue, 01 Dec 2020 14:38:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=V1K25wq1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391828AbgLAPpv (ORCPT + 99 others); Tue, 1 Dec 2020 10:45:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388237AbgLAPpv (ORCPT ); Tue, 1 Dec 2020 10:45:51 -0500 Received: from nautica.notk.org (ipv6.notk.org [IPv6:2001:41d0:1:7a93::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9EF7C0613CF; Tue, 1 Dec 2020 07:45:10 -0800 (PST) Received: by nautica.notk.org (Postfix, from userid 1001) id 8C6B4C009; Tue, 1 Dec 2020 16:45:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1606837509; bh=4ZXOky5X68edX+ZKji8/7+h5ZsUJEEYYFZe9izZo8+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V1K25wq1u1fSElfnlqOpXx/DR0/vSYT89xuRf2OGvW+Baxb7n394nVp0d6LCf8fiS ARMuITlvTDKM3wI24I76ntsZLoS6tYVHxJ4+PGhefksxvNmKLPdHN4TgNA+J1YIT9g 1E6vRacn3RaVgUCdSsMKp917hjdn6IygiZIaKUEtA4Fr/gAZd1MUqxqg2oYOkXR7FY qCu0PtB/9qTZAVS/dpn1d/A1MYw3ymiB0YFsDbwjYBuro86F/11m4dqylGG8fQz2al ptoo0xPnWDz4E4BApccvuQ4B7PgQa8EweUpkzC1Hz4lGf1Ui9I9Sn36DysRVPUuBLt LU+yKLTrrW7lw== From: Dominique Martinet To: asmadeus@codewreck.org Cc: linux-kernel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Subject: [PATCH] fs: 9p: add generic splice_write file operation Date: Tue, 1 Dec 2020 16:44:56 +0100 Message-Id: <1606837496-21717-1-git-send-email-asmadeus@codewreck.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20201201151658.GA13180@nautica> References: <20201201151658.GA13180@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The default splice operations got removed recently, add it back to 9p with iter_file_splice_write like many other filesystems do. Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Cc: Toke Høiland-Jørgensen Signed-off-by: Dominique Martinet --- fs/9p/vfs_file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 145f6f83aa9a..5f9c0c796a37 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -668,6 +668,7 @@ const struct file_operations v9fs_cached_file_operations = { .lock = v9fs_file_lock, .mmap = v9fs_file_mmap, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync, }; @@ -681,6 +682,7 @@ const struct file_operations v9fs_cached_file_operations_dotl = { .flock = v9fs_file_flock_dotl, .mmap = v9fs_file_mmap, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync_dotl, }; @@ -693,6 +695,7 @@ const struct file_operations v9fs_file_operations = { .lock = v9fs_file_lock, .mmap = generic_file_readonly_mmap, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync, }; @@ -706,6 +709,7 @@ const struct file_operations v9fs_file_operations_dotl = { .flock = v9fs_file_flock_dotl, .mmap = generic_file_readonly_mmap, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync_dotl, }; @@ -718,6 +722,7 @@ const struct file_operations v9fs_mmap_file_operations = { .lock = v9fs_file_lock, .mmap = v9fs_mmap_file_mmap, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync, }; @@ -731,5 +736,6 @@ const struct file_operations v9fs_mmap_file_operations_dotl = { .flock = v9fs_file_flock_dotl, .mmap = v9fs_mmap_file_mmap, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync_dotl, }; -- 2.28.0