From: Hongbo Li <lihongbo22@huawei.com>
To: Sandeep Dhavale <dhavale@google.com>
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-erofs mailing list <linux-erofs@lists.ozlabs.org>
Subject: Re: Maybe update the minextblks in wrong way?
Date: Thu, 24 Apr 2025 09:50:06 +0800 [thread overview]
Message-ID: <50dc6bdc-ee62-41f1-b8e5-be64defb07c6@huawei.com> (raw)
Hi Sandeep,
The consecutive chunks will be merged if possible, but after commit
545988a65131 ("erofs-utils: lib: Fix calculation of minextblks when
working with sparse files"), the @minextblks will be updated into a
smaller value even the chunks are consecutive by blobchunks.c:379. I
think maybe the last operation that updates @minextblks is unnecessary,
since this value would have already been adjusted earlier when handling
discontinuous chunks. Likes:
```
--- a/lib/blobchunk.c
+++ b/lib/blobchunk.c
@@ -376,7 +376,6 @@ int erofs_blob_write_chunked_file(struct erofs_inode
*inode, int fd,
*(void **)idx++ = chunk;
lastch = chunk;
}
- erofs_update_minextblks(sbi, interval_start, pos, &minextblks);
inode->datalayout = EROFS_INODE_CHUNK_BASED;
free(chunkdata);
return erofs_blob_mergechunks(inode, chunkbits,
```
This way can reduces the chunk index array's size. And what about your
opinion?
Thanks,
Hongbo
next reply other threads:[~2025-04-24 1:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 1:50 Hongbo Li [this message]
2025-04-24 6:51 ` Sandeep Dhavale
2025-04-24 8:11 ` Hongbo Li
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=50dc6bdc-ee62-41f1-b8e5-be64defb07c6@huawei.com \
--to=lihongbo22@huawei.com \
--cc=dhavale@google.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®