All of lore.kernel.org
 help / color / mirror / Atom feed
* [LVM2 RFCv1 0/5] Enable In-Drive-Mutex Locking scheme
@ 2021-04-25  2:22 Leo Yan
  2021-04-25  2:22 ` [LVM2 RFCv1 1/5] lvmlockd: idm: Introduce new locking scheme Leo Yan
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Leo Yan @ 2021-04-25  2:22 UTC (permalink / raw)
  To: lvm-devel

This patch set enables the In-Drive-Mutex (IDM) locking scheme.

The In-Drive-Mutex (IDM) offers an alternative to sanlock and DLM
barrier operations for lvmlockd controlled metadata updates.
This mechanism works differently from the two existing methods
in that it does not use a specific logical volume (LV) for lock leasing,
instead we rely on drives that implement new SCSI commands such that
every host can acquire and release locks from the drive firmware.
By managing the synchronization of metadata updates from multiple
servers within the drive creates a single point of truth which
removes potential state synchronization errors from drive hotswap and other
issues.  The reduction in complexity simplifies lvmlockd and increases
performance of metadata updates for shared volume groups.

For easier using IDM locking, the IDM locking manager and IDM lib are
provided.  The IDM lock manager runs as a daemon and it acts as a bridge
between lvmlockd and drive firmware; the IDM lib APIs is provided
for lvmlockd easily to invoke.  Therefore, the IDM locking manager and
IDM library are a good place to understand deeper for the locking scheme
and its algorithms, its code can be found on the github [1].

The patches in this set are arranged with the bottom-to-top approach.

The patch 01 presents the IDM wrapper layer for lvmlockd, it shows
the interface with IDM locking manager daemon.  By reading this patch,
especially for locking/unlocking/convert APIs, hope it can give out some
basic idea for the usages for IDM.  The patch 02 is to hook IDM
with lvmlockd core layer.

The latter two patches 03 and 04 are to enable Seagate IDM in the locking
lib; the locking lib is invoked by LVM commands, after enable the IDM
locking scheme, we need to ask locking lib to generate PV list for
VG/LV and pass the list from LVM command to lvmlockd.  As the result,
the PVs are the target for sending IDM SCSI commands which finally is
used by IDM lock manager.

The last patch is a minor enabling IDM locking scheme in tools.

This patch set has been tested with Seagate drives which has been
flashed firmware for supporting IDM.  The basic operations for VG/VL
creating/removing, activation/deactivation, and thin pool can pass the
testing with IDM.

It's planned to enable IDM testing with LVM testing framework, which
will be sent out later in a separate patch series.

[1] https://github.com/Seagate/propeller


Leo Yan (5):
  lvmlockd: idm: Introduce new locking scheme
  lvmlockd: idm: Hook Seagate IDM wrapper APIs
  lib: locking: Add new type "idm"
  lib: locking: Parse PV list for IDM locking
  tools: Add support for "idm" lock type

 configure                            | 173 ++++++
 configure.ac                         |  20 +
 daemons/lvmlockd/Makefile.in         |   5 +
 daemons/lvmlockd/lvmlockd-core.c     | 279 ++++++++-
 daemons/lvmlockd/lvmlockd-idm.c      | 837 +++++++++++++++++++++++++++
 daemons/lvmlockd/lvmlockd-internal.h | 110 ++++
 lib/display/display.c                |   4 +
 lib/locking/lvmlockd.c               | 356 +++++++++++-
 lib/metadata/metadata-exported.h     |   1 +
 lib/metadata/metadata.c              |  12 +-
 tools/lvconvert.c                    |   2 +
 tools/toollib.c                      |  11 +-
 12 files changed, 1756 insertions(+), 54 deletions(-)
 create mode 100644 daemons/lvmlockd/lvmlockd-idm.c

-- 
2.25.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-04-29 15:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.