From patchwork Tue Mar 8 23:29:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 12774558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC2E4C4332F for ; Wed, 9 Mar 2022 01:02:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbiCIBDn (ORCPT ); Tue, 8 Mar 2022 20:03:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbiCIBDd (ORCPT ); Tue, 8 Mar 2022 20:03:33 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5174626C2E8 for ; Tue, 8 Mar 2022 16:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646786446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LzpdmCDROwTrlpYlkIraqtI+njSbi6AnE1ba2zkJXHY=; b=EEq5UwheSruDDai63xNV5IAT8zKYveB7YL7tKV/E/XI0qvnbhKFROZ/N5BT2qFIFYq0B2a M5VSR9e3J0UzoUZRLx/DYG++zyNPm4975+hGacz4UhkdTSAOwl5hvWskHANnwwf4atOLfF Ej93g/aHxeV44V+SwhyPjlguNt9f5x4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-134-MLHGqE6TOLyeFxOn5_KQqQ-1; Tue, 08 Mar 2022 18:29:49 -0500 X-MC-Unique: MLHGqE6TOLyeFxOn5_KQqQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB4ED80205C; Tue, 8 Mar 2022 23:29:47 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id D44435DBA0; Tue, 8 Mar 2022 23:29:44 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH v2 17/19] netfs: Split some core bits out into their own file From: David Howells To: linux-cachefs@redhat.com Cc: dhowells@redhat.com, Anna Schumaker , Steve French , Dominique Martinet , Jeff Layton , David Wysochanski , Ilya Dryomov , Jeffle Xu , Linus Torvalds , linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 08 Mar 2022 23:29:44 +0000 Message-ID: <164678218407.1200972.1731208226140990280.stgit@warthog.procyon.org.uk> In-Reply-To: <164678185692.1200972.597611902374126174.stgit@warthog.procyon.org.uk> References: <164678185692.1200972.597611902374126174.stgit@warthog.procyon.org.uk> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Split some core bits out into their own file. More bits will be added to this file later. Signed-off-by: David Howells cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/164623006934.3564931.17932680017894039748.stgit@warthog.procyon.org.uk/ # v1 --- fs/netfs/Makefile | 1 + fs/netfs/internal.h | 7 +++++-- fs/netfs/io.c | 10 ---------- fs/netfs/main.c | 20 ++++++++++++++++++++ 4 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 fs/netfs/main.c diff --git a/fs/netfs/Makefile b/fs/netfs/Makefile index 88b904532bc7..f684c0cd1ec5 100644 --- a/fs/netfs/Makefile +++ b/fs/netfs/Makefile @@ -3,6 +3,7 @@ netfs-y := \ buffered_read.o \ io.o \ + main.o \ objects.o netfs-$(CONFIG_NETFS_STATS) += stats.o diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h index 1cd2778bfa7d..622b421d4753 100644 --- a/fs/netfs/internal.h +++ b/fs/netfs/internal.h @@ -23,10 +23,13 @@ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq); /* * io.c */ -extern unsigned int netfs_debug; - int netfs_begin_read(struct netfs_io_request *rreq, bool sync); +/* + * main.c + */ +extern unsigned int netfs_debug; + /* * objects.c */ diff --git a/fs/netfs/io.c b/fs/netfs/io.c index 1fe9706c58a5..4a3b7989cd1c 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -15,16 +15,6 @@ #include #include #include "internal.h" -#define CREATE_TRACE_POINTS -#include - -MODULE_DESCRIPTION("Network fs support"); -MODULE_AUTHOR("Red Hat, Inc."); -MODULE_LICENSE("GPL"); - -unsigned netfs_debug; -module_param_named(debug, netfs_debug, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(netfs_debug, "Netfs support debugging mask"); /* * Clear the unread part of an I/O request. diff --git a/fs/netfs/main.c b/fs/netfs/main.c new file mode 100644 index 000000000000..068568702957 --- /dev/null +++ b/fs/netfs/main.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* Miscellaneous bits for the netfs support library. + * + * Copyright (C) 2022 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + */ + +#include +#include +#include "internal.h" +#define CREATE_TRACE_POINTS +#include + +MODULE_DESCRIPTION("Network fs support"); +MODULE_AUTHOR("Red Hat, Inc."); +MODULE_LICENSE("GPL"); + +unsigned netfs_debug; +module_param_named(debug, netfs_debug, uint, S_IWUSR | S_IRUGO); +MODULE_PARM_DESC(netfs_debug, "Netfs support debugging mask");