From: Yue Hu <zbestahu@gmail.com>
To: linux-erofs@lists.ozlabs.org
Cc: Yue Hu <huyue2@coolpad.com>, zhangwen@coolpad.com
Subject: [PATCH] erofs-utils: avoid unnecessary insert behavior when not deduplicating
Date: Thu, 13 Oct 2022 12:00:11 +0800 [thread overview]
Message-ID: <20221013040011.31944-1-zbestahu@gmail.com> (raw)
From: Yue Hu <huyue2@coolpad.com>
We should do nothing in dedupe inserting when it's not configured.
Signed-off-by: Yue Hu <huyue2@coolpad.com>
---
lib/dedupe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dedupe.c b/lib/dedupe.c
index 7962014..9cad905 100644
--- a/lib/dedupe.c
+++ b/lib/dedupe.c
@@ -99,7 +99,7 @@ int z_erofs_dedupe_insert(struct z_erofs_inmem_extent *e,
{
struct z_erofs_dedupe_item *di;
- if (e->length < window_size)
+ if (!dedupe_subtree || e->length < window_size)
return 0;
di = malloc(sizeof(*di) + e->length - window_size);
--
2.17.1
next reply other threads:[~2022-10-13 4:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 4:00 Yue Hu [this message]
2022-10-13 8:59 ` [PATCH] erofs-utils: avoid unnecessary insert behavior when not deduplicating Gao Xiang
2022-10-14 1:48 ` Yue Hu
2022-10-14 2:15 ` Gao Xiang
2022-10-14 8:44 ` Yue Hu
2022-10-14 9:46 ` Gao Xiang
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=20221013040011.31944-1-zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=huyue2@coolpad.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=zhangwen@coolpad.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