Skip to content

Commit

Permalink
netfs: Split some core bits out into their own file
Browse files Browse the repository at this point in the history
Split some core bits out into their own file.  More bits will be added to
this file later.

Signed-off-by: David Howells <[email protected]>
cc: [email protected]
  • Loading branch information
dhowells committed Mar 3, 2022
1 parent 545be75 commit 12872c2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
1 change: 1 addition & 0 deletions fs/netfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

netfs-y := \
buffered_read.o \
main.o \
objects.o \
read_helper.o

Expand Down
7 changes: 5 additions & 2 deletions fs/netfs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
*/
void netfs_rreq_unlock_folios(struct netfs_io_request *rreq);

/*
* main.c
*/
extern unsigned int netfs_debug;

/*
* objects.c
*/
Expand All @@ -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);

/*
Expand Down
20 changes: 20 additions & 0 deletions fs/netfs/main.c
Original file line number Diff line number Diff line change
@@ -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 ([email protected])
*/

#include <linux/module.h>
#include <linux/export.h>
#include "internal.h"
#define CREATE_TRACE_POINTS
#include <trace/events/netfs.h>

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");
10 changes: 0 additions & 10 deletions fs/netfs/read_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
#include <linux/sched/mm.h>
#include <linux/task_io_accounting_ops.h>
#include "internal.h"
#define CREATE_TRACE_POINTS
#include <trace/events/netfs.h>

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.
Expand Down

0 comments on commit 12872c2

Please sign in to comment.