lkml.org 
[lkml]   [2023]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/13] ext4: calculate free_clusters_count in cluster unit in verify_group_input
On Thu, Jun 29, 2023 at 08:00:39PM +0800, Kemeng Shi wrote:
> We treat free_clusters_count in cluster unit while free_blocks_count is
> in block unit. Convert free_blocks_count to cluster unit to match the
> unit.
> Currently, verify_group_input is only called from ext4_ioctl_group_add
> which does not support bigalloc yet. The dismatch is easily ingored
> when we try to support bigalloc in ext4_ioctl_group_add (ext4_resize_fs
> already supports resize with bigalloc enabled). Just fix this in
> advance.
>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

I'd rewrite the commit description a bit:

The field free_cluster_count in struct ext4_new_group_data should be
in units of clusters. In verify_group_input() this field is being
filled in units of blocks. Fortunately, we don't support online
resizing of bigalloc file systems, and for non-bigalloc file systems,
the cluster size == block size. But fix this in case we do support
online resizing of bigalloc file systems in the future.

Other than that:

Reviewed-by: Theodore Ts'o <tytso@mit.edu>

- Ted

\
 
 \ /
  Last update: 2023-08-16 05:23    [W:1.222 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site