* [PATCH] lib/metabox: fix 48-bit layout metablock addressing
@ 2026-03-20 13:59 oz456
2026-03-20 14:04 ` Gao Xiang
0 siblings, 1 reply; 2+ messages in thread
From: oz456 @ 2026-03-20 13:59 UTC (permalink / raw)
To: linux-erofs; +Cc: xiang, hsiangkao, zhaoyifan28, oz456
Set meta_blkaddr to 0 for 48-bit layouts instead of EROFS_META_NEW_ADDR to properly support large filesystems.
Tested on normal and 48-bit layouts; meta_blkaddr is correct.
Signed-off-by: oz456 <reach.netway@gmail.com>
---
lib/metabox.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/metabox.c b/lib/metabox.c
index 12706aa..5e55cae 100644
--- a/lib/metabox.c
+++ b/lib/metabox.c
@@ -62,8 +62,10 @@ int erofs_metadata_init(struct erofs_sb_info *sbi)
if (ret)
goto err_free;
sbi->m2gr = m2gr;
- /* FIXME: sbi->meta_blkaddr should be 0 for 48-bit layouts */
- sbi->meta_blkaddr = EROFS_META_NEW_ADDR;
+ if (erofs_sb_has_48bit(sbi))
+ sbi->meta_blkaddr = 0;
+ else
+ sbi->meta_blkaddr = EROFS_META_NEW_ADDR;
}
if (!sbi->mxgr && erofs_sb_has_metabox(sbi)) {
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] lib/metabox: fix 48-bit layout metablock addressing
2026-03-20 13:59 [PATCH] lib/metabox: fix 48-bit layout metablock addressing oz456
@ 2026-03-20 14:04 ` Gao Xiang
0 siblings, 0 replies; 2+ messages in thread
From: Gao Xiang @ 2026-03-20 14:04 UTC (permalink / raw)
To: oz456, linux-erofs; +Cc: xiang, zhaoyifan28
On 2026/3/20 21:59, oz456 wrote:
> Set meta_blkaddr to 0 for 48-bit layouts instead of EROFS_META_NEW_ADDR to properly support large filesystems.
> Tested on normal and 48-bit layouts; meta_blkaddr is correct.
>
> Signed-off-by: oz456 <reach.netway@gmail.com>
why all you guys change this line?
If you don't run into anything, could you please
not touch this if you don't know enough about the codebase?
> ---
> lib/metabox.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/metabox.c b/lib/metabox.c
> index 12706aa..5e55cae 100644
> --- a/lib/metabox.c
> +++ b/lib/metabox.c
> @@ -62,8 +62,10 @@ int erofs_metadata_init(struct erofs_sb_info *sbi)
> if (ret)
> goto err_free;
> sbi->m2gr = m2gr;
> - /* FIXME: sbi->meta_blkaddr should be 0 for 48-bit layouts */
> - sbi->meta_blkaddr = EROFS_META_NEW_ADDR;
> + if (erofs_sb_has_48bit(sbi))
> + sbi->meta_blkaddr = 0;
> + else
> + sbi->meta_blkaddr = EROFS_META_NEW_ADDR;
> }
>
> if (!sbi->mxgr && erofs_sb_has_metabox(sbi)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-20 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 13:59 [PATCH] lib/metabox: fix 48-bit layout metablock addressing oz456
2026-03-20 14:04 ` Gao Xiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox