From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 13/29] Put some FIXME warnings in lvmcache_update_vg processing
Date: Tue, 21 Dec 2010 16:15:26 +0100 [thread overview]
Message-ID: <4D10C48E.3020607@redhat.com> (raw)
In-Reply-To: <24b600ce0d709f07f4628826b950770ce6190dc6.1290682013.git.zkabelac@redhat.com>
Dne 25.11.2010 11:55, Zdenek Kabelac napsal(a):
> It's not clear how this code is supposed to work.
> For now we never set INCONSISTENT_VG flag - so marking expression with
> big FIXME as it always gives true.
> Remove extra paramater from lvmcache_update_vg call - as it effectively
> produced always 'false' - so reverting to previous version - where it has been
> possible to get also 'true' - use case is probably only in cluster
> environment - some testcase is needed.
>
> Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
> ---
> lib/metadata/metadata.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
> index 743d633..fd5d024 100644
> --- a/lib/metadata/metadata.c
> +++ b/lib/metadata/metadata.c
> @@ -2679,6 +2679,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
> * the missing PV logic below.
> */
> if ((correct_vg = lvmcache_get_vg(vgid, precommitted)) &&
> + /* FIXME: Expression is always TRUE - as we never set INCONSISTENT_VG! */
> (use_precommitted || !*consistent || !(correct_vg->status & INCONSISTENT_VG))) {
> if (!(correct_vg->status & INCONSISTENT_VG))
> *consistent = 1;
> @@ -2935,8 +2936,8 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
> * If there is no precommitted metadata, committed metadata
> * is read and stored in the cache even if use_precommitted is set
> */
> - lvmcache_update_vg(correct_vg, correct_vg->status & PRECOMMITTED &
> - (inconsistent ? INCONSISTENT_VG : 0));
> + /* FIXME: How to handle INCONSISTENT_VG? */
> + lvmcache_update_vg(correct_vg, correct_vg->status & PRECOMMITTED);
>
> if (inconsistent) {
> /* FIXME Test should be if we're *using* precommitted metadata not if we were searching for it */
Any opinion about this patch ?
(missed in review)
Zdenek
next prev parent reply other threads:[~2010-12-21 15:15 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 10:55 [PATCH 00/29] Fixes for analyzer problems Zdenek Kabelac
2010-11-25 10:55 ` [PATCH 01/29] Cleanup remove test for NULL Zdenek Kabelac
2010-11-25 17:18 ` Petr Rockai
2010-11-25 10:55 ` [PATCH 02/29] Fix check for empty system_dir Zdenek Kabelac
2010-11-25 17:19 ` Petr Rockai
2010-11-25 23:12 ` Zdenek Kabelac
2010-11-26 7:35 ` Petr Rockai
2010-11-29 23:27 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 03/29] Remove printing of LCK_CACHE Zdenek Kabelac
2010-11-25 17:26 ` Petr Rockai
2010-11-29 20:44 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 04/29] Reset vg pointer after release Zdenek Kabelac
2010-11-25 17:26 ` Petr Rockai
2010-11-25 10:55 ` [PATCH 05/29] Test *buf for NULL Zdenek Kabelac
2010-11-29 20:04 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 06/29] Replace snprintf -> dm_snprintf Zdenek Kabelac
2010-11-29 20:16 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 07/29] Test success from dm_poll_create Zdenek Kabelac
2010-11-29 20:11 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 08/29] Fix memory leak in error path Zdenek Kabelac
2010-11-26 7:37 ` Petr Rockai
2010-11-25 10:55 ` [PATCH 09/29] Remove check for lv is NULL Zdenek Kabelac
2010-11-29 20:09 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 10/29] Add some backtrace - Attention please Zdenek Kabelac
2010-11-29 20:16 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 11/29] Add stack trace for error path Zdenek Kabelac
2010-11-29 20:43 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 12/29] Add test for 'read' result Zdenek Kabelac
2010-11-29 20:19 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 13/29] Put some FIXME warnings in lvmcache_update_vg processing Zdenek Kabelac
2010-12-21 15:15 ` Zdenek Kabelac [this message]
2010-11-25 10:55 ` [PATCH 14/29] Remove unneeded check for NULL pvd->system_id Zdenek Kabelac
2010-11-29 20:21 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 15/29] Modify test to catch passing NULL pointer Zdenek Kabelac
2010-11-29 21:17 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 16/29] Test uuid for NULL Zdenek Kabelac
2010-11-29 21:00 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 17/29] Optimize second call to strchr with same parameters Zdenek Kabelac
2010-11-29 20:50 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 18/29] Check result of vginfo_from_vgname Zdenek Kabelac
2010-11-29 20:56 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 19/29] Test for error status Zdenek Kabelac
2010-11-29 21:02 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 20/29] Add test for lv_name not NULL Zdenek Kabelac
2010-11-29 21:21 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 21/29] Instrument with nonnull dev_manager_transient Zdenek Kabelac
2010-11-29 21:51 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 22/29] Ensure pointer first is notnull before dereference Zdenek Kabelac
2010-11-29 21:56 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 23/29] Add test and error message for failure case Zdenek Kabelac
2010-11-29 21:18 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 24/29] Test for str_list_add Zdenek Kabelac
2010-11-29 21:19 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 25/29] Check for unlink result Zdenek Kabelac
2010-11-29 21:50 ` Alasdair G Kergon
2010-11-29 21:51 ` Alasdair G Kergon
2010-12-21 15:04 ` Zdenek Kabelac
2010-11-25 10:55 ` [PATCH 26/29] Add stack traces for dev_set/close_immediate error path Zdenek Kabelac
2010-11-29 21:22 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 27/29] Add standard check for result of lv_info call Zdenek Kabelac
2010-11-25 16:24 ` Zdenek Kabelac
2010-11-29 21:34 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 28/29] Check type is not NULL before access Zdenek Kabelac
2010-11-29 21:38 ` Alasdair G Kergon
2010-11-25 10:55 ` [PATCH 29/29] Check for NULL pointer Zdenek Kabelac
2010-11-25 23:02 ` Zdenek Kabelac
2010-11-29 22:47 ` Alasdair G Kergon
2010-11-30 12:33 ` Zdenek Kabelac
2010-11-30 13:07 ` Alasdair G Kergon
2010-11-29 21:43 ` Alasdair G Kergon
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=4D10C48E.3020607@redhat.com \
--to=zkabelac@redhat.com \
--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.