public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: puneeth_aditya_5656 <myakampuneeth@gmail.com>,
	linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH v4] erofs-utils: lib: fix 48bit addressing detection for chunk-based format
Date: Wed, 25 Feb 2026 16:19:46 +0800	[thread overview]
Message-ID: <08aa23dd-a70c-46ed-990b-65ef73ea632e@linux.alibaba.com> (raw)
In-Reply-To: <20260225073943.11361-1-myakampuneeth@gmail.com>



On 2026/2/25 15:39, puneeth_aditya_5656 wrote:
> The 48-bit chunk format flag was being set inside
> erofs_blob_write_chunked_file right after erofs_blob_getchunk returns.
> At that point chunk->blkaddr is the chunk's offset in the temporary
> blob buffer, not the final image address. The real address is only
> known after erofs_mkfs_dump_blobs applies remapped_base, so a chunk
> that lands above UINT32_MAX after remapping may not get flagged at all,
> producing a corrupt image.
> 
> Fix this by introducing erofs_inode_fixup_chunkformat() which walks
> the chunk array after remapped_base is finalized and sets the 48-bit
> flag if any chunk address exceeds UINT32_MAX. The fixup is called from
> erofs_iflush so that the correct chunkformat is written into the
> on-disk inode header. Both blob chunks (remapped_base + chunk->blkaddr)
> and device chunks (chunk->blkaddr directly) are handled.
> 
> Signed-off-by: Puneeth Aditya <myakampuneeth@gmail.com>

LGTM, will apply, although I still wonder how to add a reasonable
testcase since it needs to generate a huge image.)

Thanks,
Gao Xiang


      reply	other threads:[~2026-02-25  8:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  5:57 [PATCH] blobchunk: fix 48-bit format detection to use final remapped block addresses puneeth_aditya_5656
2026-02-24  6:44 ` Gao Xiang
2026-02-24 16:37 ` [PATCH v2] erofs-utils: lib: fix 48bit addressing detection for chunk-based format puneeth_aditya_5656
2026-02-24 17:44   ` Gao Xiang
2026-02-24 19:10 ` puneeth_aditya_5656
2026-02-24 19:13 ` [PATCH v3] " puneeth_aditya_5656
2026-02-25  3:55   ` Gao Xiang
2026-02-25  7:39 ` [PATCH v4] " puneeth_aditya_5656
2026-02-25  8:19   ` Gao Xiang [this message]

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=08aa23dd-a70c-46ed-990b-65ef73ea632e@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=myakampuneeth@gmail.com \
    /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