We need to record why it's actually not needed in the git log.
Etienne Brateau, le dim. 23 janv. 2022 05:17:14 +0100, a ecrit:
> ---
> ext2fs/ialloc.c | 34 ++++++++--------------------------
> 1 file changed, 8 insertions(+), 26 deletions(-)
>
> diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
> index 73778bee..568d7eae 100644
> --- a/ext2fs/ialloc.c
> +++ b/ext2fs/ialloc.c
> @@ -133,36 +133,18 @@ repeat:
> {
> avefreei = le32toh (sblock->s_free_inodes_count) / groups_count;
>
> -/* I am not yet convinced that this next bit is necessary.
> - i = inode_group_num(dir_inum);
> for (j = 0; j < groups_count; j++)
> {
> - tmp = group_desc (i);
> - if ((tmp->bg_used_dirs_count << 8) < tmp->bg_free_inodes_count)
> + tmp = group_desc (j);
> + if (le16toh (tmp->bg_free_inodes_count)
> + && le16toh (tmp->bg_free_inodes_count) >= avefreei)
> {
> - gdp = tmp;
> - break;
> - }
> - else
> - i = ++i % groups_count;
> - }
> - */
> -
> - if (!gdp)
> - {
> - for (j = 0; j < groups_count; j++)
> - {
> - tmp = group_desc (j);
> - if (le16toh (tmp->bg_free_inodes_count)
> - && le16toh (tmp->bg_free_inodes_count) >= avefreei)
> + if (!gdp ||
> + (le16toh (tmp->bg_free_blocks_count) >
> + le16toh (gdp->bg_free_blocks_count)))
> {
> - if (!gdp ||
> - (le16toh (tmp->bg_free_blocks_count) >
> - le16toh (gdp->bg_free_blocks_count)))
> - {
> - i = j;
> - gdp = tmp;
> - }
> + i = j;
> + gdp = tmp;
> }
> }
> }
> --
> 2.34.1- Re: [PATCH 11/17] ext2fs: resolve a todo, check writa... Samuel Thibault
- [PATCH 08/17] ext2fs: Take cares of indiannes Etienne Brateau
- Re: [PATCH 08/17] ext2fs: Take cares of indiannes Samuel Thibault
- Re: [PATCH 08/17] ext2fs: Take cares of indiannes Samuel Thibault
- [PATCH 14/17] ext2fs: refactor add a method for dupplicate... Etienne Brateau
- Re: [PATCH 14/17] ext2fs: refactor add a method for d... Samuel Thibault
- [PATCH 17/17] ext2fs: remove 2 unused functions Etienne Brateau
- Re: [PATCH 17/17] ext2fs: remove 2 unused functions Samuel Thibault
- Re: [PATCH 17/17] ext2fs: remove 2 unused functio... Etienne Brateau
- [PATCH 16/17] ext2fs: remove a commented block of code Etienne Brateau
- Re: [PATCH 16/17] ext2fs: remove a commented block of... Samuel Thibault
- [PATCH 13/17] ext2fs: remove a #define not_yet Etienne Brateau
- Re: [PATCH 13/17] ext2fs: remove a #define not_yet Samuel Thibault
- Re: [PATCH 13/17] ext2fs: remove a #define not_ye... Etienne Brateau
- Re: [PATCH 13/17] ext2fs: remove a #define no... Samuel Thibault
- [PATCH 02/17] ext2fs: update ext2_fs.h header Etienne Brateau
- Re: [PATCH 02/17] ext2fs: update ext2_fs.h header Samuel Thibault
- [PATCH 07/17] ext2fs: use macro to check flags Etienne Brateau
- Re: [PATCH 07/17] ext2fs: use macro to check flags Samuel Thibault
- [PATCH 12/17] ext2fs: detect and warn when filesystem is a... Etienne Brateau
- Re: [PATCH 12/17] ext2fs: detect and warn when filesy... Samuel Thibault
