1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-23 02:05:07 +03:00
Dave Wysochanski 07b0c948ee Add vg_lock_newname() library function.
Various tools need to check for existence of a VG before doing something
(vgsplit, vgrename, vgcreate).  Currently we don't have an interface to
check for existence, but the existence check is part of the vg_read* call(s).
This patch is an attempt to pull out some of that functionality into a
separate function, and hopefully simplify our vg_read interface, and
move those patches along.

vg_lock_newname() is only concerned about checking whether a vg exists in
the system.  Unfortunately, we cannot just scan the system, but we must first
obtain a lock.  Since we are reserving a vgname, we take a WRITE lock on
the vgname.  Once obtained, we scan the system to ensure the name does
not exist.  The return codes and behavior is in the function header.
You might think of this function as similar to an open() call with
O_CREAT and O_EXCL flags (returns failure with -EEXIST if file already
exists).

NOTE: I think including the word "lock" in the function name is important,
as it clearly states the function obtains a lock and makes the code more
readable, especially when it comes to cleanup / unlocking.  The ultimate
function name is somewhat open for debate though so later we may rename.
2009-06-09 14:29:10 +00:00
2009-05-11 10:28:45 +00:00
2008-11-01 02:19:19 +00:00
2009-06-06 16:40:39 +00:00
2001-12-31 16:12:40 +00:00
2008-11-04 17:49:22 +00:00
2009-05-11 10:28:45 +00:00
2008-11-04 17:49:22 +00:00
2009-05-22 15:23:10 +00:00
2009-05-22 15:23:10 +00:00
2009-06-04 13:23:10 +00:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sources.redhat.com/pub/lvm2/

To access the CVS tree use:
  cvs -d :pserver:cvs@sources.redhat.com:/cvs/lvm2 login
  CVS password: cvs
  cvs -d :pserver:cvs@sources.redhat.com:/cvs/lvm2 co LVM2

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing list for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel
Description
LVM2 mirror repository
https://sourceware.org/lvm2/
Readme 55 MiB
Languages
C 75.5%
Shell 18.7%
Python 2.9%
M4 1%
Makefile 0.8%
Other 1%