[PATCH] erofs-utils: stress: add support for dumping inconsistent data

2025-03-16 Thread Gao Xiang
... dump inconsistent data for further analysis during stress tests. Signed-off-by: Gao Xiang --- contrib/stress.c | 65 +++- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/contrib/stress.c b/contrib/stress.c index eedd9b9..27d5133 1006

Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-03-16 Thread Gao Xiang
Hi Chao, On 2025/3/16 10:36, Chao Yu wrote: On 2025/2/10 11:29, Hongzhen Luo wrote: There's no need to enumerate each type.  No logic changes. Signed-off-by: Hongzhen Luo Looks good to me, feel free to add: Reviewed-by: Chao Yu And one minor comment below. diff --git a/fs/erofs/zmap.c

Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-03-16 Thread Gao Xiang
On 2025/3/17 01:17, Gao Xiang wrote: Hi Chao, On 2025/3/16 10:36, Chao Yu wrote: On 2025/2/10 11:29, Hongzhen Luo wrote: There's no need to enumerate each type.  No logic changes. Signed-off-by: Hongzhen Luo Looks good to me, feel free to add: Reviewed-by: Chao Yu And one minor comme

[PATCH v2 06/10] erofs: initialize decompression early

2025-03-16 Thread Gao Xiang
- Rename erofs_init_managed_cache() to z_erofs_init_super(); - Move the initialization of managed_pslots into z_erofs_init_super() too; - Move z_erofs_init_super() and packed inode preparation upwards, before the root inode initialization. Therefore, the root directory can also be compressib

Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-03-16 Thread Gao Xiang
On 2025/3/17 14:42, Chao Yu wrote: On 3/17/25 14:15, Gao Xiang wrote: Hi Chao, On 2025/3/17 14:03, Chao Yu wrote: On 3/17/25 01:17, Gao Xiang wrote: Hi Chao, ... Previously, it was useful before Z_EROFS_LCLUSTER_TYPE_HEAD2 was introduced, but the `default:` case is already deadcode n

[PATCH v3 06/10] erofs: initialize decompression early

2025-03-16 Thread Gao Xiang
- Rename erofs_init_managed_cache() to z_erofs_init_super(); - Move the initialization of managed_pslots into z_erofs_init_super() too; - Move z_erofs_init_super() and packed inode preparation upwards, before the root inode initialization. Therefore, the root directory can also be compressib

Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-03-16 Thread Chao Yu
On 3/17/25 01:17, Gao Xiang wrote: > Hi Chao, > > On 2025/3/16 10:36, Chao Yu wrote: >> On 2025/2/10 11:29, Hongzhen Luo wrote: >>> There's no need to enumerate each type.  No logic changes. >>> >>> Signed-off-by: Hongzhen Luo >> >> Looks good to me, feel free to add: >> >> Reviewed-by: Chao Yu

Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-03-16 Thread Gao Xiang
Hi Chao, On 2025/3/17 14:03, Chao Yu wrote: On 3/17/25 01:17, Gao Xiang wrote: Hi Chao, ... Previously, it was useful before Z_EROFS_LCLUSTER_TYPE_HEAD2 was introduced, but the `default:` case is already deadcode now. Xiang, thanks for the explanation. So seems it can happen when mount

Re: [PATCH v5] erofs: use Z_EROFS_LCLUSTER_TYPE_MAX to simplify switches

2025-03-16 Thread Chao Yu
On 3/17/25 14:15, Gao Xiang wrote: > Hi Chao, > > On 2025/3/17 14:03, Chao Yu wrote: >> On 3/17/25 01:17, Gao Xiang wrote: >>> Hi Chao, >>> > > ... > >>> >>> Previously, it was useful before Z_EROFS_LCLUSTER_TYPE_HEAD2 was >>> introduced, but the `default:` case is already deadcode now. >> >> Xi