From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - fix bad result from _cache_min_metadata_size
Date: Wed, 10 Jun 2020 17:31:45 +0000 (GMT) [thread overview]
Message-ID: <20200610173145.0A13F388C030@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=712c9efbf6104a863b610a006e72d7da8336fa7e
Commit: 712c9efbf6104a863b610a006e72d7da8336fa7e
Parent: 48c1a295a294fefa0886885f13604f134ceaf406
Author: David Teigland <teigland@redhat.com>
AuthorDate: Fri Apr 10 16:57:12 2020 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Jun 10 12:17:34 2020 -0500
fix bad result from _cache_min_metadata_size
fixes regression from switching to use _cache_min_metadata_size
(commit c08704cee7e34a96fdaa453faf900683283e8691) which returns
a bogus value when the cachevol size is 8MB.
---
lib/metadata/cache_manip.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index 49b385052..a786e8bac 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -1094,6 +1094,10 @@ int cache_vol_set_params(struct cmd_context *cmd,
if (!meta_size) {
meta_size = _cache_min_metadata_size(pool_lv->size, chunk_size);
+ /* fix bad value from _cache_min_metadata_size */
+ if (meta_size > (pool_lv->size / 2))
+ meta_size = pool_lv->size / 2;
+
if (meta_size < min_meta_size)
meta_size = min_meta_size;
reply other threads:[~2020-06-10 17:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200610173145.0A13F388C030@sourceware.org \
--to=teigland@sourceware.org \
--cc=lvm-devel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.