lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <50dc6bdc-ee62-41f1-b8e5-be64defb07c6@huawei.com>
Date: Thu, 24 Apr 2025 09:50:06 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: Sandeep Dhavale <dhavale@...gle.com>
CC: Gao Xiang <hsiangkao@...ux.alibaba.com>, LKML
	<linux-kernel@...r.kernel.org>, linux-erofs mailing list
	<linux-erofs@...ts.ozlabs.org>
Subject: Re: Maybe update the minextblks in wrong way?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ