Re: [PATCH -next] ext4: don't pass full mapping flags to ext4_es_insert_extent()
From: Jan Kara
Date: Fri Sep 06 2024 - 06:36:01 EST
On Fri 06-09-24 14:14:01, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@xxxxxxxxxx>
>
> When converting a delalloc extent in ext4_es_insert_extent(), since we
> only want to pass the info of whether the quota has already been claimed
> if the allocation is a direct allocation from ext4_map_create_blocks(),
> there is no need to pass full mapping flags, so changes to just pass
> whether the EXT4_GET_BLOCKS_DELALLOC_RESERVE bit is set.
>
> Suggested-by: Jan Kara <jack@xxxxxxx>
> Signed-off-by: Zhang Yi <yi.zhang@xxxxxxxxxx>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@xxxxxxx>
> @@ -863,8 +863,8 @@ void ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
> if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
> return;
>
> - es_debug("add [%u/%u) %llu %x %x to extent status tree of inode %lu\n",
> - lblk, len, pblk, status, flags, inode->i_ino);
> + es_debug("add [%u/%u) %llu %x %d to extent status tree of inode %lu\n",
> + lblk, len, pblk, status, delalloc_reserve_used, inode->i_ino);
Ah, I didn't know 'bool' gets automatically promoted to 'int' when passed
as variadic argument but it seems to be the case from what I've found. One
always learns :)
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR