diff mbox series

btrfs: update comment for reservation of metadata space for delayed items

Message ID 283a7c5087a950342a862fba42922fad4fc71365.1693208275.git.fdmanana@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: update comment for reservation of metadata space for delayed items | expand

Commit Message

Filipe Manana Aug. 28, 2023, 7:38 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

The second comment at btrfs_delayed_item_reserve_metadata() refers to a
field named "index_items_size" of a delayed inode, however that field
does not exists - it existed in a previous patch version, but then it
split into the fields "curr_index_batch_size" and "index_item_leaves"
in the final patch version that was picked. So update the comment.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/delayed-inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josef Bacik Aug. 28, 2023, 1:27 p.m. UTC | #1
On Mon, Aug 28, 2023 at 08:38:36AM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The second comment at btrfs_delayed_item_reserve_metadata() refers to a
> field named "index_items_size" of a delayed inode, however that field
> does not exists - it existed in a previous patch version, but then it
> split into the fields "curr_index_batch_size" and "index_item_leaves"
> in the final patch version that was picked. So update the comment.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef
David Sterba Sept. 5, 2023, 11:06 a.m. UTC | #2
On Mon, Aug 28, 2023 at 08:38:36AM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> The second comment at btrfs_delayed_item_reserve_metadata() refers to a
> field named "index_items_size" of a delayed inode, however that field
> does not exists - it existed in a previous patch version, but then it
> split into the fields "curr_index_batch_size" and "index_item_leaves"
> in the final patch version that was picked. So update the comment.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Added to misc-next, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 85dcf0024137..08ecb4d0cc45 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -513,7 +513,7 @@  static int btrfs_delayed_item_reserve_metadata(struct btrfs_trans_handle *trans,
 		/*
 		 * For insertions we track reserved metadata space by accounting
 		 * for the number of leaves that will be used, based on the delayed
-		 * node's index_items_size field.
+		 * node's curr_index_batch_size and index_item_leaves fields.
 		 */
 		if (item->type == BTRFS_DELAYED_DELETION_ITEM)
 			item->bytes_reserved = num_bytes;