On Mon, Jan 06, 2014 at 05:29:37PM +0100, Lukas Czerner wrote:
> Upstream commit: 8f9ff189205a6817aee5a1f996f876541f86e07c
> Stable version: 3.12.y

I'm also queuing it for the 3.11 kernel.  Thanks!

Cheers,
--
Luis


> When using FITRIM ioctl on a file system without journal it will
> only trim the block group once, no matter how many times you invoke
> FITRIM ioctl and how many block you release from the block group.
> 
> It is because we only clear EXT4_GROUP_INFO_WAS_TRIMMED_BIT in journal
> callback. Fix this by clearing the bit in no journal mode as well.
> 
> Signed-off-by: Lukas Czerner <[email protected]>
> Signed-off-by: "Theodore Ts'o" <[email protected]>
> Reported-by: Jorge Fábregas <[email protected]>
> ---
>  fs/ext4/mballoc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index a41e3ba..4d113ef 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -4794,8 +4794,8 @@ do_more:
>                                        " group:%d block:%d count:%lu failed"
>                                        " with %d", block_group, bit, count,
>                                        err);
> -             }
> -
> +             } else
> +                     EXT4_MB_GRP_CLEAR_TRIMMED(e4b.bd_info);
>  
>               ext4_lock_group(sb, block_group);
>               mb_clear_bits(bitmap_bh->b_data, bit, count_clusters);
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to