diff mbox series

[07/17] btrfs: move BTRFS_MAX_MIRRORS into scrub.c

Message ID 37fa62e6907f1eff71e2c77b9dadb324a408d9a2.1663167823.git.josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show
Series btrfs: initial ctree.h cleanups, simple stuff | expand

Commit Message

Josef Bacik Sept. 14, 2022, 3:06 p.m. UTC
This is only used locally in scrub.c, move it out of ctree.h into
scrub.c.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/ctree.h | 11 -----------
 fs/btrfs/scrub.c | 11 +++++++++++
 2 files changed, 11 insertions(+), 11 deletions(-)

Comments

Qu Wenruo Sept. 15, 2022, 9:11 a.m. UTC | #1
On 2022/9/14 23:06, Josef Bacik wrote:
> This is only used locally in scrub.c, move it out of ctree.h into
> scrub.c.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>   fs/btrfs/ctree.h | 11 -----------
>   fs/btrfs/scrub.c | 11 +++++++++++
>   2 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 5e6b025c0870..e1ec047deff6 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -50,17 +50,6 @@ struct btrfs_ref;
>   struct btrfs_bio;
>   struct btrfs_ioctl_encoded_io_args;
>   
> -/*
> - * Maximum number of mirrors that can be available for all profiles counting
> - * the target device of dev-replace as one. During an active device replace
> - * procedure, the target device of the copy operation is a mirror for the
> - * filesystem data as well that can be used to read data in order to repair
> - * read errors on other disks.
> - *
> - * Current value is derived from RAID1C4 with 4 copies.
> - */
> -#define BTRFS_MAX_MIRRORS (4 + 1)
> -
>   #define BTRFS_OLDEST_GENERATION	0ULL
>   
>   #define BTRFS_EMPTY_DIR_SIZE 0
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index 9b6a0adccc7b..35fca65f0f2a 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -56,6 +56,17 @@ struct scrub_ctx;
>   
>   #define SCRUB_MAX_PAGES			(DIV_ROUND_UP(BTRFS_MAX_METADATA_BLOCKSIZE, PAGE_SIZE))
>   
> +/*
> + * Maximum number of mirrors that can be available for all profiles counting
> + * the target device of dev-replace as one. During an active device replace
> + * procedure, the target device of the copy operation is a mirror for the
> + * filesystem data as well that can be used to read data in order to repair
> + * read errors on other disks.
> + *
> + * Current value is derived from RAID1C4 with 4 copies.
> + */
> +#define BTRFS_MAX_MIRRORS (4 + 1)
> +
>   struct scrub_recover {
>   	refcount_t		refs;
>   	struct btrfs_io_context	*bioc;
Johannes Thumshirn Sept. 15, 2022, 2:16 p.m. UTC | #2
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff mbox series

Patch

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5e6b025c0870..e1ec047deff6 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -50,17 +50,6 @@  struct btrfs_ref;
 struct btrfs_bio;
 struct btrfs_ioctl_encoded_io_args;
 
-/*
- * Maximum number of mirrors that can be available for all profiles counting
- * the target device of dev-replace as one. During an active device replace
- * procedure, the target device of the copy operation is a mirror for the
- * filesystem data as well that can be used to read data in order to repair
- * read errors on other disks.
- *
- * Current value is derived from RAID1C4 with 4 copies.
- */
-#define BTRFS_MAX_MIRRORS (4 + 1)
-
 #define BTRFS_OLDEST_GENERATION	0ULL
 
 #define BTRFS_EMPTY_DIR_SIZE 0
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 9b6a0adccc7b..35fca65f0f2a 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -56,6 +56,17 @@  struct scrub_ctx;
 
 #define SCRUB_MAX_PAGES			(DIV_ROUND_UP(BTRFS_MAX_METADATA_BLOCKSIZE, PAGE_SIZE))
 
+/*
+ * Maximum number of mirrors that can be available for all profiles counting
+ * the target device of dev-replace as one. During an active device replace
+ * procedure, the target device of the copy operation is a mirror for the
+ * filesystem data as well that can be used to read data in order to repair
+ * read errors on other disks.
+ *
+ * Current value is derived from RAID1C4 with 4 copies.
+ */
+#define BTRFS_MAX_MIRRORS (4 + 1)
+
 struct scrub_recover {
 	refcount_t		refs;
 	struct btrfs_io_context	*bioc;