public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Ajay Rajera <newajay.11r@gmail.com>, linux-erofs@lists.ozlabs.org
Cc: xiang@kernel.org
Subject: Re: [PATCH 2/2] erofs-utils: lib: fix meta_blkaddr handling for 48-bit layout
Date: Thu, 19 Mar 2026 21:45:17 +0800	[thread overview]
Message-ID: <dc88120d-eb36-46e7-a642-78e626c97ccf@linux.alibaba.com> (raw)
In-Reply-To: <20260319133948.396-2-newajay.11r@gmail.com>



On 2026/3/19 21:39, Ajay Rajera wrote:
> Fix the FIXME in metabox.c by properly handling meta_blkaddr for 48-bit layouts. In erofs_writesb(), set meta_blkaddr to 0 on-disk when 48-bit layout is enabled since meta_blkaddr is encoded differently in that mode. Remove the now-resolved FIXME comment in metabox.c as the issue is addressed in super.c.
> 
> Signed-off-by: Ajay Rajera <newajay.11r@gmail.com>
> ---
>   lib/metabox.c | 1 -
>   lib/super.c   | 2 +-
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/metabox.c b/lib/metabox.c
> index d6abd51..077f88b 100644
> --- a/lib/metabox.c
> +++ b/lib/metabox.c
> @@ -62,7 +62,6 @@ 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 */

I don't think it's a valid patch, I need to find more clue why
it was a FIXME.

>   		sbi->meta_blkaddr = EROFS_META_NEW_ADDR;
>   	}
>   
> diff --git a/lib/super.c b/lib/super.c
> index 088c9a0..99d2a24 100644
> --- a/lib/super.c
> +++ b/lib/super.c
> @@ -209,7 +209,7 @@ int erofs_writesb(struct erofs_sb_info *sbi)
>   		.epoch     = cpu_to_le64(sbi->epoch),
>   		.build_time = cpu_to_le64(sbi->build_time),
>   		.fixed_nsec = cpu_to_le32(sbi->fixed_nsec),
> -		.meta_blkaddr  = cpu_to_le32(sbi->meta_blkaddr),
> +		.meta_blkaddr  = cpu_to_le32(erofs_sb_has_48bit(sbi) ? 0 : sbi->meta_blkaddr),
>   		.xattr_blkaddr = cpu_to_le32(sbi->xattr_blkaddr),
>   		.xattr_prefix_count = sbi->xattr_prefix_count,
>   		.xattr_prefix_start = cpu_to_le32(sbi->xattr_prefix_start),



  reply	other threads:[~2026-03-19 13:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 13:39 [PATCH 1/2] erofs-utils: lib: replace bool locked with erofs_mutex_t for MT safety Ajay Rajera
2026-03-19 13:39 ` [PATCH 2/2] erofs-utils: lib: fix meta_blkaddr handling for 48-bit layout Ajay Rajera
2026-03-19 13:45   ` Gao Xiang [this message]
2026-03-19 16:53     ` Ajay
2026-03-19 13:42 ` [PATCH 1/2] erofs-utils: lib: replace bool locked with erofs_mutex_t for MT safety Gao Xiang
2026-03-19 16:05   ` Ajay
2026-03-19 13:44 ` Ajay
2026-03-19 15:57 ` [PATCH v2 " Ajay Rajera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc88120d-eb36-46e7-a642-78e626c97ccf@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=newajay.11r@gmail.com \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox