[PATCH] erofs-utils: avoid unnecessary insert behavior when not deduplicating
Gao Xiang
hsiangkao at linux.alibaba.com
Fri Oct 14 20:46:38 AEDT 2022
On Fri, Oct 14, 2022 at 04:44:22PM +0800, Yue Hu wrote:
> Hi Xiang,
>
> On Fri, 14 Oct 2022 10:15:27 +0800
> Gao Xiang <hsiangkao at linux.alibaba.com> wrote:
>
> > On Fri, Oct 14, 2022 at 09:48:46AM +0800, Yue Hu wrote:
> > > On Thu, 13 Oct 2022 16:59:26 +0800
> > > Gao Xiang <hsiangkao at linux.alibaba.com> wrote:
> > >
> > > > Hi Yue,
> > > >
> > > > On Thu, Oct 13, 2022 at 12:00:11PM +0800, Yue Hu wrote:
> > > > > From: Yue Hu <huyue2 at coolpad.com>
> > > > >
> > > > > We should do nothing in dedupe inserting when it's not configured.
> > > > >
> > > > > Signed-off-by: Yue Hu <huyue2 at coolpad.com>
> > > > > ---
> > > >
> > > > Thanks for the patch, do you observe some strange happening?
> > >
> > > I can see malloc/memcpy at runtime when dedupe is disabled. So, just skip.
> >
> > Would you mind confirming the numbers of e->length and window_size
> > at that time?
>
> The caller to insert function is just checking "!may_inline && !may_packing".
>
> Check below (-zlz4hc foo.img foo/):
>
> Processing .gitignore ...
> <E> erofs: z_erofs_dedupe_insert() Line[105] e->length 84, window_size 0
> Processing Kconfig.freezer ...
> <E> erofs: z_erofs_dedupe_insert() Line[105] e->length 92, window_size 0
> Processing Kconfig.hz ...
> <E> erofs: z_erofs_dedupe_insert() Line[105] e->length 1709, window_size 0
>
Thanks for confirming!
Thanks,
Gao Xiang
More information about the Linux-erofs
mailing list