All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Do not count VG_GLOBAL to lock_count.
Date: Mon, 13 Jul 2009 17:42:27 +0200	[thread overview]
Message-ID: <4A5B55E3.5020606@redhat.com> (raw)
In-Reply-To: <1247242163.2462.10.camel@f10-node1>

Dave Wysochanski wrote:
> On Fri, 2009-07-10 at 16:10 +0200, Milan Broz wrote:
> Wouldn't a better fix just be changing pvscan and vgscan to use
> LCK_VG_READ instead of LCK_VG_WRITE since they are not updating
> metadata?  Or is there a problem with doing that?

The VG_LOCK thing is one hack, it is a "special" lock...

It was introduced because of cluster, to notify other nodes
about need of metadata cache changes.

Moreover, the real metadata are cached, only if VG_GLOBAL is held.

Anyway, if you want to manipulate with any VG, you have to take
anothe (real) VG locks.

I tried to use the simplest solution - ignore VG_GLOBAL the same way
how lvmcache ingores it

	if (strcmp(vgname, VG_GLOBAL))
		_vgs_locked++;

Your proposal is possible too, but it means than we need to audit all
uses.

I remember that I used some special handling in process_each_pv()
for example if LCK_VG_READ is set...

(It will probably work but I used the simplest solution here.) 
 
> I guess in general I don't like the idea of affecting the count.  Unless
> of course we want to call "VG_GLOBAL" not really a vg lock.  But then
> the naming seems inconsistent.

The whole idea of using special locks for communication between nodes
is misleading but also simple:-)

Milan



      reply	other threads:[~2009-07-13 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 14:10 [PATCH] Do not count VG_GLOBAL to lock_count Milan Broz
2009-07-10 16:09 ` Dave Wysochanski
2009-07-13 15:42   ` Milan Broz [this message]

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=4A5B55E3.5020606@redhat.com \
    --to=mbroz@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.