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-prev] [day] [month] [year] [list]
Message-ID: <e556fddf-c103-c658-51d2-32ee44041d6d@kernel.org>
Date:   Fri, 4 Feb 2022 11:14:43 +0800
From:   Chao Yu <chao@...nel.org>
To:     Gao Xiang <xiang@...nel.org>, linux-erofs@...ts.ozlabs.org
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Gao Xiang <hsiangkao@...ux.alibaba.com>
Subject: Re: [PATCH] erofs: fix small compressed files inlining

On 2022/2/4 3:02, Gao Xiang wrote:
> From: Gao Xiang <hsiangkao@...ux.alibaba.com>
> 
> Prior to ztailpacking feature, it's enough that each lcluster has
> two pclusters at most, and the last pcluster should be turned into
> an uncompressed pcluster if necessary. For example,
>    _________________________________________________
>   |_ pcluster n-2 _|_ pcluster n-1 _|____ EOFed ____|
> 
> which should be converted into:
>    _________________________________________________
>   |_ pcluster n-2 _|_ pcluster n-1 (uncompressed)' _|
> 
> That is fine since either pcluster n-1 or (uncompressed)' takes one
> physical block.
> 
> However, after ztailpacking supported, the game is changed since the
> last pcluster can be inlined now. And such case above is quite common
> for inlining small files. Therefore, in order to inline such files
> more effectively, special EOF lclusters are now supported which can
> have three parts at most, as illustrated below:
>    _________________________________________________
>   |_ pcluster n-2 _|_ pcluster n-1 _|____ EOFed ____|
>                                     ^ i_size
> 
> Actually similar code exists in Yue Hu's original patchset [1], but I
> removed this part on purpose. After evaluating more real cases with
> small files, I've changed my mind.
> 
> [1] https://lore.kernel.org/r/20211215094449.15162-1-huyue2@yulong.com
> Fixes: ab92184ff8f1 ("erofs: add on-disk compressed tail-packing inline support")
> Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>

Reviewed-by: Chao Yu <chao@...nel.org>

Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ