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>
This commit is contained in:
Josef Bacik 2022-10-26 15:08:35 -04:00 committed by David Sterba
parent 677074792a
commit 2fc6822c99
9 changed files with 23 additions and 11 deletions

View File

@ -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);

View File

@ -25,6 +25,7 @@
#include "block-group.h"
#include "fs.h"
#include "accessors.h"
#include "scrub.h"
/*
* Device replace overview

View File

@ -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 |\

View File

@ -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

View File

@ -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

16
fs/btrfs/scrub.h Normal file
View File

@ -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

View File

@ -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>

View File

@ -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;

View File

@ -38,6 +38,7 @@
#include "uuid-tree.h"
#include "ioctl.h"
#include "relocation.h"
#include "scrub.h"
static struct bio_set btrfs_bioset;