* [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1
@ 2021-02-11 5:25 Anand Jain
2021-02-11 5:25 ` [PATCH 1/5] btrfs: make btrfs_extent_readonly() static Anand Jain
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Anand Jain @ 2021-02-11 5:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: josef
This patchset makes btrfs_extent_readonly() static and changes the return
type to bool.
And drops few unwanted function declarations in the scrub.c.
Thanks. Anand
Anand Jain (5):
btrfs: make btrfs_extent_readonly() static
btrfs: btrfs_extent_readonly() change return type to bool
btrfs: scrub drop few function declarations
btrfs: scrub_checksum_tree_block() drop its function declaration
btrfs: scrub_checksum_data() drop its function declaration
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 13 ---
fs/btrfs/inode.c | 13 +++
fs/btrfs/scrub.c | 202 ++++++++++++++++++++---------------------
4 files changed, 109 insertions(+), 120 deletions(-)
--
2.27.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/5] btrfs: make btrfs_extent_readonly() static
2021-02-11 5:25 [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1 Anand Jain
@ 2021-02-11 5:25 ` Anand Jain
2021-02-11 5:25 ` [PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool Anand Jain
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Anand Jain @ 2021-02-11 5:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: josef
btrfs_extent_readonly() is used by can_nocow_extent() in inode.c. So move
btrfs_extent_readonly() from extent-tree.c to inode.c and declare it as
static.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 13 -------------
fs/btrfs/inode.c | 13 +++++++++++++
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 40ec3393d2a1..df9dfb322ab4 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2691,7 +2691,6 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans);
int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
struct btrfs_ref *generic_ref);
-int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr);
void btrfs_clear_space_info_full(struct btrfs_fs_info *info);
/*
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 78ad31a59e59..5e228d6ad63f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2490,19 +2490,6 @@ int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
return __btrfs_mod_ref(trans, root, buf, full_backref, 0);
}
-int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
-{
- struct btrfs_block_group *block_group;
- int readonly = 0;
-
- block_group = btrfs_lookup_block_group(fs_info, bytenr);
- if (!block_group || block_group->ro)
- readonly = 1;
- if (block_group)
- btrfs_put_block_group(block_group);
- return readonly;
-}
-
static u64 get_alloc_profile_by_root(struct btrfs_root *root, int data)
{
struct btrfs_fs_info *fs_info = root->fs_info;
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 6303034a7e7b..2ed7d736e39a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7256,6 +7256,19 @@ static struct extent_map *btrfs_new_extent_direct(struct btrfs_inode *inode,
return em;
}
+static int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
+{
+ struct btrfs_block_group *block_group;
+ int readonly = 0;
+
+ block_group = btrfs_lookup_block_group(fs_info, bytenr);
+ if (!block_group || block_group->ro)
+ readonly = 1;
+ if (block_group)
+ btrfs_put_block_group(block_group);
+ return readonly;
+}
+
/*
* Check if we can do nocow write into the range [@offset, @offset + @len)
*
--
2.27.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool
2021-02-11 5:25 [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1 Anand Jain
2021-02-11 5:25 ` [PATCH 1/5] btrfs: make btrfs_extent_readonly() static Anand Jain
@ 2021-02-11 5:25 ` Anand Jain
2021-02-11 13:00 ` Johannes Thumshirn
2021-02-11 5:25 ` [PATCH 3/5] btrfs: scrub drop few function declarations Anand Jain
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Anand Jain @ 2021-02-11 5:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: josef
btrfs_extent_readonly() checks if the bg is readonly, the bool return type
will suffice its need.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/inode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2ed7d736e39a..ebb2b8e3a71c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7256,14 +7256,14 @@ static struct extent_map *btrfs_new_extent_direct(struct btrfs_inode *inode,
return em;
}
-static int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
+static bool btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
{
struct btrfs_block_group *block_group;
- int readonly = 0;
+ bool readonly = false;
block_group = btrfs_lookup_block_group(fs_info, bytenr);
if (!block_group || block_group->ro)
- readonly = 1;
+ readonly = true;
if (block_group)
btrfs_put_block_group(block_group);
return readonly;
--
2.27.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/5] btrfs: scrub drop few function declarations
2021-02-11 5:25 [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1 Anand Jain
2021-02-11 5:25 ` [PATCH 1/5] btrfs: make btrfs_extent_readonly() static Anand Jain
2021-02-11 5:25 ` [PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool Anand Jain
@ 2021-02-11 5:25 ` Anand Jain
2021-02-11 13:27 ` Johannes Thumshirn
2021-02-11 5:25 ` [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration Anand Jain
2021-02-11 5:25 ` [PATCH 5/5] btrfs: scrub_checksum_data() " Anand Jain
4 siblings, 1 reply; 13+ messages in thread
From: Anand Jain @ 2021-02-11 5:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: josef
Drop function declarations at the beginning of the file scrub.c. These
functions are defined before they are used in the same file.
No functional changes.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/scrub.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 70a90ca2c8da..029477dd77de 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -206,9 +206,6 @@ struct full_stripe_lock {
struct mutex mutex;
};
-static void scrub_pending_bio_inc(struct scrub_ctx *sctx);
-static void scrub_pending_bio_dec(struct scrub_ctx *sctx);
-static int scrub_handle_errored_block(struct scrub_block *sblock_to_check);
static int scrub_setup_recheck_block(struct scrub_block *original_sblock,
struct scrub_block *sblocks_for_recheck);
static void scrub_recheck_block(struct btrfs_fs_info *fs_info,
@@ -226,14 +223,11 @@ static int scrub_write_page_to_dev_replace(struct scrub_block *sblock,
static int scrub_checksum_data(struct scrub_block *sblock);
static int scrub_checksum_tree_block(struct scrub_block *sblock);
static int scrub_checksum_super(struct scrub_block *sblock);
-static void scrub_block_get(struct scrub_block *sblock);
static void scrub_block_put(struct scrub_block *sblock);
static void scrub_page_get(struct scrub_page *spage);
static void scrub_page_put(struct scrub_page *spage);
static void scrub_parity_get(struct scrub_parity *sparity);
static void scrub_parity_put(struct scrub_parity *sparity);
-static int scrub_add_page_to_rd_bio(struct scrub_ctx *sctx,
- struct scrub_page *spage);
static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u32 len,
u64 physical, struct btrfs_device *dev, u64 flags,
u64 gen, int mirror_num, u8 *csum,
@@ -251,8 +245,6 @@ static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx,
static void scrub_wr_submit(struct scrub_ctx *sctx);
static void scrub_wr_bio_end_io(struct bio *bio);
static void scrub_wr_bio_end_io_worker(struct btrfs_work *work);
-static void __scrub_blocked_if_needed(struct btrfs_fs_info *fs_info);
-static void scrub_blocked_if_needed(struct btrfs_fs_info *fs_info);
static void scrub_put_ctx(struct scrub_ctx *sctx);
static inline int scrub_is_page_on_raid56(struct scrub_page *spage)
--
2.27.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration
2021-02-11 5:25 [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1 Anand Jain
` (2 preceding siblings ...)
2021-02-11 5:25 ` [PATCH 3/5] btrfs: scrub drop few function declarations Anand Jain
@ 2021-02-11 5:25 ` Anand Jain
2021-02-11 13:28 ` Johannes Thumshirn
2021-02-12 14:36 ` David Sterba
2021-02-11 5:25 ` [PATCH 5/5] btrfs: scrub_checksum_data() " Anand Jain
4 siblings, 2 replies; 13+ messages in thread
From: Anand Jain @ 2021-02-11 5:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: josef
Move the static function scrub_checksum_tree_block() before its use in
the scrub.c, and drop its declaration.
No functional changes.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/scrub.c | 133 +++++++++++++++++++++++------------------------
1 file changed, 66 insertions(+), 67 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 029477dd77de..bc335dd6a54f 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -221,7 +221,6 @@ static void scrub_write_block_to_dev_replace(struct scrub_block *sblock);
static int scrub_write_page_to_dev_replace(struct scrub_block *sblock,
int page_num);
static int scrub_checksum_data(struct scrub_block *sblock);
-static int scrub_checksum_tree_block(struct scrub_block *sblock);
static int scrub_checksum_super(struct scrub_block *sblock);
static void scrub_block_put(struct scrub_block *sblock);
static void scrub_page_get(struct scrub_page *spage);
@@ -1506,6 +1505,72 @@ static inline int scrub_check_fsid(u8 fsid[],
return !ret;
}
+static int scrub_checksum_tree_block(struct scrub_block *sblock)
+{
+ struct scrub_ctx *sctx = sblock->sctx;
+ struct btrfs_header *h;
+ struct btrfs_fs_info *fs_info = sctx->fs_info;
+ SHASH_DESC_ON_STACK(shash, fs_info->csum_shash);
+ u8 calculated_csum[BTRFS_CSUM_SIZE];
+ u8 on_disk_csum[BTRFS_CSUM_SIZE];
+ /*
+ * This is done in sectorsize steps even for metadata as there's a
+ * constraint for nodesize to be aligned to sectorsize. This will need
+ * to change so we don't misuse data and metadata units like that.
+ */
+ const u32 sectorsize = sctx->fs_info->sectorsize;
+ const int num_sectors = fs_info->nodesize >> fs_info->sectorsize_bits;
+ int i;
+ struct scrub_page *spage;
+ char *kaddr;
+
+ BUG_ON(sblock->page_count < 1);
+
+ /* Each member in pagev is just one block, not a full page */
+ ASSERT(sblock->page_count == num_sectors);
+
+ spage = sblock->pagev[0];
+ kaddr = page_address(spage->page);
+ h = (struct btrfs_header *)kaddr;
+ memcpy(on_disk_csum, h->csum, sctx->fs_info->csum_size);
+
+ /*
+ * we don't use the getter functions here, as we
+ * a) don't have an extent buffer and
+ * b) the page is already kmapped
+ */
+ if (spage->logical != btrfs_stack_header_bytenr(h))
+ sblock->header_error = 1;
+
+ if (spage->generation != btrfs_stack_header_generation(h)) {
+ sblock->header_error = 1;
+ sblock->generation_error = 1;
+ }
+
+ if (!scrub_check_fsid(h->fsid, spage))
+ sblock->header_error = 1;
+
+ if (memcmp(h->chunk_tree_uuid, fs_info->chunk_tree_uuid,
+ BTRFS_UUID_SIZE))
+ sblock->header_error = 1;
+
+ shash->tfm = fs_info->csum_shash;
+ crypto_shash_init(shash);
+ crypto_shash_update(shash, kaddr + BTRFS_CSUM_SIZE,
+ sectorsize - BTRFS_CSUM_SIZE);
+
+ for (i = 1; i < num_sectors; i++) {
+ kaddr = page_address(sblock->pagev[i]->page);
+ crypto_shash_update(shash, kaddr, sectorsize);
+ }
+
+ crypto_shash_final(shash, calculated_csum);
+ if (memcmp(calculated_csum, on_disk_csum, sctx->fs_info->csum_size))
+ sblock->checksum_error = 1;
+
+ return sblock->header_error || sblock->checksum_error;
+}
+
static void scrub_recheck_block_checksum(struct scrub_block *sblock)
{
sblock->header_error = 0;
@@ -1835,72 +1900,6 @@ static int scrub_checksum_data(struct scrub_block *sblock)
return sblock->checksum_error;
}
-static int scrub_checksum_tree_block(struct scrub_block *sblock)
-{
- struct scrub_ctx *sctx = sblock->sctx;
- struct btrfs_header *h;
- struct btrfs_fs_info *fs_info = sctx->fs_info;
- SHASH_DESC_ON_STACK(shash, fs_info->csum_shash);
- u8 calculated_csum[BTRFS_CSUM_SIZE];
- u8 on_disk_csum[BTRFS_CSUM_SIZE];
- /*
- * This is done in sectorsize steps even for metadata as there's a
- * constraint for nodesize to be aligned to sectorsize. This will need
- * to change so we don't misuse data and metadata units like that.
- */
- const u32 sectorsize = sctx->fs_info->sectorsize;
- const int num_sectors = fs_info->nodesize >> fs_info->sectorsize_bits;
- int i;
- struct scrub_page *spage;
- char *kaddr;
-
- BUG_ON(sblock->page_count < 1);
-
- /* Each member in pagev is just one block, not a full page */
- ASSERT(sblock->page_count == num_sectors);
-
- spage = sblock->pagev[0];
- kaddr = page_address(spage->page);
- h = (struct btrfs_header *)kaddr;
- memcpy(on_disk_csum, h->csum, sctx->fs_info->csum_size);
-
- /*
- * we don't use the getter functions here, as we
- * a) don't have an extent buffer and
- * b) the page is already kmapped
- */
- if (spage->logical != btrfs_stack_header_bytenr(h))
- sblock->header_error = 1;
-
- if (spage->generation != btrfs_stack_header_generation(h)) {
- sblock->header_error = 1;
- sblock->generation_error = 1;
- }
-
- if (!scrub_check_fsid(h->fsid, spage))
- sblock->header_error = 1;
-
- if (memcmp(h->chunk_tree_uuid, fs_info->chunk_tree_uuid,
- BTRFS_UUID_SIZE))
- sblock->header_error = 1;
-
- shash->tfm = fs_info->csum_shash;
- crypto_shash_init(shash);
- crypto_shash_update(shash, kaddr + BTRFS_CSUM_SIZE,
- sectorsize - BTRFS_CSUM_SIZE);
-
- for (i = 1; i < num_sectors; i++) {
- kaddr = page_address(sblock->pagev[i]->page);
- crypto_shash_update(shash, kaddr, sectorsize);
- }
-
- crypto_shash_final(shash, calculated_csum);
- if (memcmp(calculated_csum, on_disk_csum, sctx->fs_info->csum_size))
- sblock->checksum_error = 1;
-
- return sblock->header_error || sblock->checksum_error;
-}
-
static int scrub_checksum_super(struct scrub_block *sblock)
{
struct btrfs_super_block *s;
--
2.27.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/5] btrfs: scrub_checksum_data() drop its function declaration
2021-02-11 5:25 [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1 Anand Jain
` (3 preceding siblings ...)
2021-02-11 5:25 ` [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration Anand Jain
@ 2021-02-11 5:25 ` Anand Jain
2021-02-11 13:30 ` Johannes Thumshirn
4 siblings, 1 reply; 13+ messages in thread
From: Anand Jain @ 2021-02-11 5:25 UTC (permalink / raw)
To: linux-btrfs; +Cc: josef
Move scrub_checksum_data() before its use, and drop its declaration.
No functional changes.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/scrub.c | 61 ++++++++++++++++++++++++------------------------
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index bc335dd6a54f..62ea81eded03 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -220,7 +220,6 @@ static int scrub_repair_page_from_good_copy(struct scrub_block *sblock_bad,
static void scrub_write_block_to_dev_replace(struct scrub_block *sblock);
static int scrub_write_page_to_dev_replace(struct scrub_block *sblock,
int page_num);
-static int scrub_checksum_data(struct scrub_block *sblock);
static int scrub_checksum_super(struct scrub_block *sblock);
static void scrub_block_put(struct scrub_block *sblock);
static void scrub_page_get(struct scrub_page *spage);
@@ -1505,6 +1504,36 @@ static inline int scrub_check_fsid(u8 fsid[],
return !ret;
}
+static int scrub_checksum_data(struct scrub_block *sblock)
+{
+ struct scrub_ctx *sctx = sblock->sctx;
+ struct btrfs_fs_info *fs_info = sctx->fs_info;
+ SHASH_DESC_ON_STACK(shash, fs_info->csum_shash);
+ u8 csum[BTRFS_CSUM_SIZE];
+ struct scrub_page *spage;
+ char *kaddr;
+
+ BUG_ON(sblock->page_count < 1);
+ spage = sblock->pagev[0];
+ if (!spage->have_csum)
+ return 0;
+
+ kaddr = page_address(spage->page);
+
+ shash->tfm = fs_info->csum_shash;
+ crypto_shash_init(shash);
+
+ /*
+ * In scrub_pages() and scrub_pages_for_parity() we ensure each spage
+ * only contains one sector of data.
+ */
+ crypto_shash_digest(shash, kaddr, fs_info->sectorsize, csum);
+
+ if (memcmp(csum, spage->csum, fs_info->csum_size))
+ sblock->checksum_error = 1;
+ return sblock->checksum_error;
+}
+
static int scrub_checksum_tree_block(struct scrub_block *sblock)
{
struct scrub_ctx *sctx = sblock->sctx;
@@ -1870,36 +1899,6 @@ static int scrub_checksum(struct scrub_block *sblock)
return ret;
}
-static int scrub_checksum_data(struct scrub_block *sblock)
-{
- struct scrub_ctx *sctx = sblock->sctx;
- struct btrfs_fs_info *fs_info = sctx->fs_info;
- SHASH_DESC_ON_STACK(shash, fs_info->csum_shash);
- u8 csum[BTRFS_CSUM_SIZE];
- struct scrub_page *spage;
- char *kaddr;
-
- BUG_ON(sblock->page_count < 1);
- spage = sblock->pagev[0];
- if (!spage->have_csum)
- return 0;
-
- kaddr = page_address(spage->page);
-
- shash->tfm = fs_info->csum_shash;
- crypto_shash_init(shash);
-
- /*
- * In scrub_pages() and scrub_pages_for_parity() we ensure each spage
- * only contains one sector of data.
- */
- crypto_shash_digest(shash, kaddr, fs_info->sectorsize, csum);
-
- if (memcmp(csum, spage->csum, fs_info->csum_size))
- sblock->checksum_error = 1;
- return sblock->checksum_error;
-}
-
static int scrub_checksum_super(struct scrub_block *sblock)
{
struct btrfs_super_block *s;
--
2.27.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool
2021-02-11 5:25 ` [PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool Anand Jain
@ 2021-02-11 13:00 ` Johannes Thumshirn
0 siblings, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2021-02-11 13:00 UTC (permalink / raw)
To: Anand Jain, linux-btrfs; +Cc: josef
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] btrfs: scrub drop few function declarations
2021-02-11 5:25 ` [PATCH 3/5] btrfs: scrub drop few function declarations Anand Jain
@ 2021-02-11 13:27 ` Johannes Thumshirn
0 siblings, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2021-02-11 13:27 UTC (permalink / raw)
To: Anand Jain, linux-btrfs; +Cc: josef
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration
2021-02-11 5:25 ` [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration Anand Jain
@ 2021-02-11 13:28 ` Johannes Thumshirn
2021-02-12 14:36 ` David Sterba
1 sibling, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2021-02-11 13:28 UTC (permalink / raw)
To: Anand Jain, linux-btrfs; +Cc: josef
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 5/5] btrfs: scrub_checksum_data() drop its function declaration
2021-02-11 5:25 ` [PATCH 5/5] btrfs: scrub_checksum_data() " Anand Jain
@ 2021-02-11 13:30 ` Johannes Thumshirn
0 siblings, 0 replies; 13+ messages in thread
From: Johannes Thumshirn @ 2021-02-11 13:30 UTC (permalink / raw)
To: Anand Jain, linux-btrfs; +Cc: josef
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration
2021-02-11 5:25 ` [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration Anand Jain
2021-02-11 13:28 ` Johannes Thumshirn
@ 2021-02-12 14:36 ` David Sterba
2021-02-25 1:21 ` Anand Jain
1 sibling, 1 reply; 13+ messages in thread
From: David Sterba @ 2021-02-12 14:36 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs, josef
On Wed, Feb 10, 2021 at 09:25:18PM -0800, Anand Jain wrote:
> Move the static function scrub_checksum_tree_block() before its use in
> the scrub.c, and drop its declaration.
>
> No functional changes.
We've rejected patches that move static function within one file unless
there's another reason for it other than removing the prototype.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration
2021-02-12 14:36 ` David Sterba
@ 2021-02-25 1:21 ` Anand Jain
2021-02-25 16:16 ` David Sterba
0 siblings, 1 reply; 13+ messages in thread
From: Anand Jain @ 2021-02-25 1:21 UTC (permalink / raw)
To: dsterba, linux-btrfs, josef
On 12/02/2021 22:36, David Sterba wrote:
> On Wed, Feb 10, 2021 at 09:25:18PM -0800, Anand Jain wrote:
>> Move the static function scrub_checksum_tree_block() before its use in
>> the scrub.c, and drop its declaration.
>>
>> No functional changes.
>
> We've rejected patches that move static function within one file unless
> there's another reason for it other than removing the prototype.
Ok.
Patches 1-3 aren't of this type. I suppose they will be integrated?
Thanks, Anand
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration
2021-02-25 1:21 ` Anand Jain
@ 2021-02-25 16:16 ` David Sterba
0 siblings, 0 replies; 13+ messages in thread
From: David Sterba @ 2021-02-25 16:16 UTC (permalink / raw)
To: Anand Jain; +Cc: dsterba, linux-btrfs, josef
On Thu, Feb 25, 2021 at 09:21:31AM +0800, Anand Jain wrote:
> On 12/02/2021 22:36, David Sterba wrote:
> > On Wed, Feb 10, 2021 at 09:25:18PM -0800, Anand Jain wrote:
> >> Move the static function scrub_checksum_tree_block() before its use in
> >> the scrub.c, and drop its declaration.
> >>
> >> No functional changes.
> >
>
> > We've rejected patches that move static function within one file unless
> > there's another reason for it other than removing the prototype.
>
> Ok.
> Patches 1-3 aren't of this type. I suppose they will be integrated?
Yes, they're good cleanups and now in misc-next, thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-02-25 16:19 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 5:25 [PATCH 0/5] cleanups btrfs_extent_readonly() and scrub, part1 Anand Jain
2021-02-11 5:25 ` [PATCH 1/5] btrfs: make btrfs_extent_readonly() static Anand Jain
2021-02-11 5:25 ` [PATCH 2/5] btrfs: btrfs_extent_readonly() change return type to bool Anand Jain
2021-02-11 13:00 ` Johannes Thumshirn
2021-02-11 5:25 ` [PATCH 3/5] btrfs: scrub drop few function declarations Anand Jain
2021-02-11 13:27 ` Johannes Thumshirn
2021-02-11 5:25 ` [PATCH 4/5] btrfs: scrub_checksum_tree_block() drop its function declaration Anand Jain
2021-02-11 13:28 ` Johannes Thumshirn
2021-02-12 14:36 ` David Sterba
2021-02-25 1:21 ` Anand Jain
2021-02-25 16:16 ` David Sterba
2021-02-11 5:25 ` [PATCH 5/5] btrfs: scrub_checksum_data() " Anand Jain
2021-02-11 13:30 ` Johannes Thumshirn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.