All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: lvm-devel@redhat.com
Subject: [LVM2 RFCv1 1/5] lvmlockd: idm: Introduce new locking scheme
Date: Thu, 29 Apr 2021 11:26:45 +0800	[thread overview]
Message-ID: <20210429032645.GB199698@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <20210428195445.GF9566@redhat.com>

On Wed, Apr 28, 2021 at 02:54:45PM -0500, David Teigland wrote:
> On Sun, Apr 25, 2021 at 10:22:37AM +0800, Leo Yan wrote:
> > One thing should be mentioned is the IDM's LVB.  IDM supports LVB to max
> > 7 bytes when stores into the drive, the most significant byte of 8 bytes
> > is reserved for control bits.  For this reason, the patch maps the
> > timestamp in macrosecond unit with its cached LVB, essentially, if any
> > timestamp was updated by other nodes, that means the local LVB is
> > invalidate thus the metadata should be invlidated.  When the timestamp
> > is stored into drive's LVB, it's possbile to cause time-going-backwards
> > issue, which is introduced by the time precision or missing
> > synchronization acrossing over multiple nodes.  So the IDM wrapper fixes
> > up the timestamp by increment 1 to the latest value and write back into
> > drive.
> 
> While lvmlockd, sanlock, dlm are still using the LVB to track VG changes,
> it's not actually being used for anything any longer.  When lvm used
> lvmetad to cache metadata, we used the LVB to trigger lvmetad cache
> invalidation.  It's possible that this LVB functionality could be useful
> again in the future.

Thanks for reminding.  So I think it's good to keep LVB functionality
for IDM in lvmlockd, which allows IDM have the consistent supporting
with other locking schemes (sanlock and dlm), and maybe can be used
later as you said;  will update the commit log to reflect this.

As a side topic, just curious if LVM doesn't use LVB for invalidation
the cached metadata, then now LVM uses which mechanism for metadata
invalidation?  Sorry this question shows my lacking knowledge, but just
want to ensure I don't miss anything for the IDM enabling.

Thanks,
Leo



  reply	other threads:[~2021-04-29  3:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  2:22 [LVM2 RFCv1 0/5] Enable In-Drive-Mutex Locking scheme Leo Yan
2021-04-25  2:22 ` [LVM2 RFCv1 1/5] lvmlockd: idm: Introduce new locking scheme Leo Yan
2021-04-28 19:54   ` David Teigland
2021-04-29  3:26     ` Leo Yan [this message]
2021-04-29 15:31       ` David Teigland
2021-04-25  2:22 ` [LVM2 RFCv1 2/5] lvmlockd: idm: Hook Seagate IDM wrapper APIs Leo Yan
2021-04-25  2:22 ` [LVM2 RFCv1 3/5] lib: locking: Add new type "idm" Leo Yan
2021-04-25  2:22 ` [LVM2 RFCv1 4/5] lib: locking: Parse PV list for IDM locking Leo Yan
2021-04-28 19:39   ` David Teigland
2021-04-29  3:12     ` Leo Yan
2021-04-29  3:36       ` Leo Yan
2021-04-25  2:22 ` [LVM2 RFCv1 5/5] tools: Add support for "idm" lock type Leo Yan
2021-04-27 22:23 ` [LVM2 RFCv1 0/5] Enable In-Drive-Mutex Locking scheme David Teigland
2021-04-28  1:50   ` Leo Yan

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=20210429032645.GB199698@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.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.