summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-10-26 22:08:35 +0300
committerDavid Sterba <dsterba@suse.com>2022-12-05 20:00:47 +0300
commit2fc6822c99d7e902b7cef146efa37420d41c0c59 (patch)
tree56db1b95c19c5765147ce48eb88e4f470dc96104 /fs/btrfs
parent677074792a1d533232ec5517f23f78d64e6dffac (diff)
downloadlinux-2fc6822c99d7e902b7cef146efa37420d41c0c59.tar.xz
btrfs: move scrub prototypes into scrub.h
Move these out of ctree.h into scrub.h to cut down on code in ctree.h. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ctree.h11
-rw-r--r--fs/btrfs/dev-replace.c1
-rw-r--r--fs/btrfs/disk-io.c1
-rw-r--r--fs/btrfs/ioctl.c1
-rw-r--r--fs/btrfs/scrub.c1
-rw-r--r--fs/btrfs/scrub.h16
-rw-r--r--fs/btrfs/super.c1
-rw-r--r--fs/btrfs/transaction.c1
-rw-r--r--fs/btrfs/volumes.c1
9 files changed, 23 insertions, 11 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b1b6de508e20..f3facc10646c 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -732,17 +732,6 @@ static inline unsigned long get_eb_page_index(unsigned long offset)
#define EXPORT_FOR_TESTS
#endif
-/* scrub.c */
-int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
- u64 end, struct btrfs_scrub_progress *progress,
- int readonly, int is_dev_replace);
-void btrfs_scrub_pause(struct btrfs_fs_info *fs_info);
-void btrfs_scrub_continue(struct btrfs_fs_info *fs_info);
-int btrfs_scrub_cancel(struct btrfs_fs_info *info);
-int btrfs_scrub_cancel_dev(struct btrfs_device *dev);
-int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
- struct btrfs_scrub_progress *progress);
-
/* dev-replace.c */
void btrfs_bio_counter_inc_blocked(struct btrfs_fs_info *fs_info);
void btrfs_bio_counter_sub(struct btrfs_fs_info *fs_info, s64 amount);
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 94f8975034ce..84af2010fae2 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -25,6 +25,7 @@
#include "block-group.h"
#include "fs.h"
#include "accessors.h"
+#include "scrub.h"
/*
* Device replace overview
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index a613a9a7caae..880bd39680bc 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -50,6 +50,7 @@
#include "defrag.h"
#include "uuid-tree.h"
#include "relocation.h"
+#include "scrub.h"
#define BTRFS_SUPER_FLAG_SUPP (BTRFS_HEADER_FLAG_WRITTEN |\
BTRFS_HEADER_FLAG_RELOC |\
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index dba1f07b4194..98cf16f118b5 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -59,6 +59,7 @@
#include "uuid-tree.h"
#include "ioctl.h"
#include "file.h"
+#include "scrub.h"
#ifdef CONFIG_64BIT
/* If we have a 32-bit userspace and 64-bit kernel, then the UAPI
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index e46e6c4d4bf9..8c89e63ef2e8 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -24,6 +24,7 @@
#include "fs.h"
#include "accessors.h"
#include "file-item.h"
+#include "scrub.h"
/*
* This is only the first step towards a full-features scrub. It reads all
diff --git a/fs/btrfs/scrub.h b/fs/btrfs/scrub.h
new file mode 100644
index 000000000000..7639103ebf9d
--- /dev/null
+++ b/fs/btrfs/scrub.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef BTRFS_SCRUB_H
+#define BTRFS_SCRUB_H
+
+int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
+ u64 end, struct btrfs_scrub_progress *progress,
+ int readonly, int is_dev_replace);
+void btrfs_scrub_pause(struct btrfs_fs_info *fs_info);
+void btrfs_scrub_continue(struct btrfs_fs_info *fs_info);
+int btrfs_scrub_cancel(struct btrfs_fs_info *info);
+int btrfs_scrub_cancel_dev(struct btrfs_device *dev);
+int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
+ struct btrfs_scrub_progress *progress);
+
+#endif
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 2cd05246bcd3..4bfda9be4556 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -55,6 +55,7 @@
#include "defrag.h"
#include "dir-item.h"
#include "ioctl.h"
+#include "scrub.h"
#define CREATE_TRACE_POINTS
#include <trace/events/btrfs.h>
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a262fd188abe..593b2414e2be 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -33,6 +33,7 @@
#include "uuid-tree.h"
#include "ioctl.h"
#include "relocation.h"
+#include "scrub.h"
static struct kmem_cache *btrfs_trans_handle_cachep;
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index abfa6a9e20e6..5606060770eb 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -38,6 +38,7 @@
#include "uuid-tree.h"
#include "ioctl.h"
#include "relocation.h"
+#include "scrub.h"
static struct bio_set btrfs_bioset;