From patchwork Wed Mar 2 14:07:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 12766165 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 A247EC4332F for ; Wed, 2 Mar 2022 14:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239900AbiCBOJf (ORCPT ); Wed, 2 Mar 2022 09:09:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242823AbiCBOJZ (ORCPT ); Wed, 2 Mar 2022 09:09:25 -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 97AEE36B75 for ; Wed, 2 Mar 2022 06:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646230080; 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=VTkKdjHuL63ApKjhrgCkFANVRCDzUZyuGqw8sCyTceM=; b=gMngmxnEblAhcrM3w8eDIzXaRF9nNko1KCu9KHmyjIgK3UIw+AdBBkfeWW6aX6M88SHuNA VJyyxKvesdBRDcGsKdfQmltmJhlnd2MNkKvFwJVydVo4qJP23aOzi3tTmZd2AtK2HIrFgc QR++x2Y1AiCEk0pRNf9F5Omq6Yj8Oq0= 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-358-WYsPWAjRMGWQ01Qx1d2wDA-1; Wed, 02 Mar 2022 09:07:59 -0500 X-MC-Unique: WYsPWAjRMGWQ01Qx1d2wDA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B1E11091DA2; Wed, 2 Mar 2022 14:07:57 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EFF77B61E; Wed, 2 Mar 2022 14:07:50 +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 15/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: Wed, 02 Mar 2022 14:07:49 +0000 Message-ID: <164623006934.3564931.17932680017894039748.stgit@warthog.procyon.org.uk> In-Reply-To: <164622970143.3564931.3656393397237724303.stgit@warthog.procyon.org.uk> References: <164622970143.3564931.3656393397237724303.stgit@warthog.procyon.org.uk> User-Agent: StGit/1.4 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 --- fs/netfs/Makefile | 1 + fs/netfs/internal.h | 7 +++++-- fs/netfs/main.c | 20 ++++++++++++++++++++ fs/netfs/read_helper.c | 10 ---------- 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 0466159b8222..029657b6db63 100644 --- a/fs/netfs/Makefile +++ b/fs/netfs/Makefile @@ -2,6 +2,7 @@ netfs-y := \ buffered_read.o \ + main.o \ objects.o \ read_helper.o diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h index 7d8e83deaf81..f9dd64521fe6 100644 --- a/fs/netfs/internal.h +++ b/fs/netfs/internal.h @@ -20,6 +20,11 @@ */ void netfs_rreq_unlock_folios(struct netfs_io_request *rreq); +/* + * main.c + */ +extern unsigned int netfs_debug; + /* * objects.c */ @@ -42,8 +47,6 @@ static inline void netfs_see_request(struct netfs_io_request *rreq, /* * read_helper.c */ -extern unsigned int netfs_debug; - int netfs_begin_read(struct netfs_io_request *rreq, bool sync); /* 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"); diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c index 78843820d9f1..3db9356eb7c2 100644 --- a/fs/netfs/read_helper.c +++ b/fs/netfs/read_helper.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.