lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 29 Aug 2023 16:27:06 +0800
From:   Joseph Qi <joseph.qi@...ux.alibaba.com>
To:     Yuanheng Zhang <yuanhengzhang1214@...il.com>, mark@...heh.com,
        akpm <akpm@...ux-foundation.org>
Cc:     jlbec@...lplan.org, ocfs2-devel@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ocfs2: correct range->len in ocfs2_trim_fs()



On 8/28/23 1:17 PM, Yuanheng Zhang wrote:
> global bitmap is a cluster allocator,so after we traverse
> the global bitmap and finished the fstrim,the trimmed range
> should be 'trimmed * clustersize'.otherwise,the trimmed range
> printed by 'fstrim -v' is not as expected.
> 
> Signed-off-by: Yuanheng Zhang <yuanhengzhang1214@...il.com>

Thanks for pointing this out. It looks fine to me.

Reviewed-by: Joseph Qi <joseph.qi@...ux.alibaba.com>

> ---
>  fs/ocfs2/alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
> index 51c93929a146..bced551240cf 100644
> --- a/fs/ocfs2/alloc.c
> +++ b/fs/ocfs2/alloc.c
> @@ -7642,7 +7642,7 @@ int ocfs2_trim_mainbm(struct super_block *sb, struct fstrim_range *range)
>  		goto next_group;
>  	}
>  out:
> -	range->len = trimmed * sb->s_blocksize;
> +	range->len = trimmed * osb->s_clustersize;
>  	return ret;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ