2019-10-08 00:53:11

by Marcos Paulo de Souza

[permalink] [raw]
Subject: [PATCH] btrfs: block-group: Rework documentation of check_system_chunk function

Commit 4617ea3a52cf (" Btrfs: fix necessary chunk tree space calculation
when allocating a chunk") removed the is_allocation argument from
check_system_chunk, since the formula for reserving the necessary space
for allocation or removing a chunk would be the same.

So, rework the comment by removing the mention of is_allocation
argument.

Signed-off-by: Marcos Paulo de Souza <[email protected]>
---
fs/btrfs/block-group.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index bf7e3f23bba7..4910921838db 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -2987,9 +2987,7 @@ static u64 get_profile_num_devs(struct btrfs_fs_info *fs_info, u64 type)
}

/*
- * If @is_allocation is true, reserve space in the system space info necessary
- * for allocating a chunk, otherwise if it's false, reserve space necessary for
- * removing a chunk.
+ * Reserve space in the system space for allocating or removing a chunk
*/
void check_system_chunk(struct btrfs_trans_handle *trans, u64 type)
{
--
2.23.0


2019-10-08 07:28:47

by Nikolay Borisov

[permalink] [raw]
Subject: Re: [PATCH] btrfs: block-group: Rework documentation of check_system_chunk function



On 8.10.19 г. 3:50 ч., Marcos Paulo de Souza wrote:
> Commit 4617ea3a52cf (" Btrfs: fix necessary chunk tree space calculation
> when allocating a chunk") removed the is_allocation argument from
> check_system_chunk, since the formula for reserving the necessary space
> for allocation or removing a chunk would be the same.
>
> So, rework the comment by removing the mention of is_allocation
> argument.
>
> Signed-off-by: Marcos Paulo de Souza <[email protected]>

Reviewed-by: Nikolay Borisov <[email protected]>


> ---
> fs/btrfs/block-group.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
> index bf7e3f23bba7..4910921838db 100644
> --- a/fs/btrfs/block-group.c
> +++ b/fs/btrfs/block-group.c
> @@ -2987,9 +2987,7 @@ static u64 get_profile_num_devs(struct btrfs_fs_info *fs_info, u64 type)
> }
>
> /*
> - * If @is_allocation is true, reserve space in the system space info necessary
> - * for allocating a chunk, otherwise if it's false, reserve space necessary for
> - * removing a chunk.
> + * Reserve space in the system space for allocating or removing a chunk
> */
> void check_system_chunk(struct btrfs_trans_handle *trans, u64 type)
> {
> --
> 2.23.0
>
>

2019-10-08 11:44:59

by David Sterba

[permalink] [raw]
Subject: Re: [PATCH] btrfs: block-group: Rework documentation of check_system_chunk function

On Mon, Oct 07, 2019 at 09:50:38PM -0300, Marcos Paulo de Souza wrote:
> Commit 4617ea3a52cf (" Btrfs: fix necessary chunk tree space calculation
> when allocating a chunk") removed the is_allocation argument from
> check_system_chunk, since the formula for reserving the necessary space
> for allocation or removing a chunk would be the same.
>
> So, rework the comment by removing the mention of is_allocation
> argument.
>
> Signed-off-by: Marcos Paulo de Souza <[email protected]>

Added to misc-next, thanks.