1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Dave Wysochanski 0f2f8a5c3a Before committing each mda, arrange mdas so ignored mdas get committed first.
Arrange mdas so mdas that are to be ignored come first.  This is an
optimization that ensures consistency on disk for the longest period of time.
This was noted by agk in review of the v4 patchset of pvchange-based mda
balance.

Note the following example for an explanation of the background:
Assume the initial state on disk is as follows:
PV0 (v1, non-ignored)
PV1 (v1, non-ignored)
PV2 (v1, non-ignored)
PV3 (v1, non-ignored)

If we did not sort the list, we would have a commit sequence something like
this:
PV0 (v2, non-ignored)
PV1 (v2, ignored)
PV2 (v2, ignored)
PV3 (v2, non-ignored)

After the commit of PV0's mdas, we'd have an on-disk state like this:
PV0 (v2, non-ignored)
PV1 (v1, non-ignored)
PV2 (v1, non-ignored)
PV3 (v1, non-ignored)

This is an inconsistent state of the disk. If the machine fails, the next
time it was brought back up, the auto-correct mechanism in vg_read would
update the metadata on PV1-PV3.  However, if possible we try to avoid
inconsistent on-disk states.  Clearly, because we did not sort, we have
a greater chance of on-disk inconsistency - from the time the commit of
PV0 is complete until the time PV3 is complete.

We could improve the amount of time the on-disk state is consistent by simply
sorting the commit order as follows:
PV1 (v2, ignored)
PV2 (v2, ignored)
PV0 (v2, non-ignored)
PV3 (v2, non-ignored)

Thus, after the first PV is committed (in this case PV1), on-disk we would
have:
PV0 (v1, non-ignored)
PV1 (v2, ignored)
PV2 (v1, non-ignored)
PV3 (v1, non-ignored)

This is clearly a consistent state.  PV1 will be read but the mda will be
ignored.  All other PVs contain v1 metadata, and no auto-correct will be
required.  In fact, if we commit all PVs with ignored mdas first, we'll
only have an inconsistent state when we start writing non-ignored PVs,
and thus the chances we'll get an inconsistent state on disk is much
less with the sorted method.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:35:49 +00:00
autoconf extended configure with --enable-profiling for compiling code with gcov info 2008-06-27 15:35:09 +00:00
daemons Add error checking for calls to sprintf - it can fail for more 2010-06-21 16:07:06 +00:00
doc Fix lvm2cmd example in documentation. 2010-06-16 13:03:48 +00:00
include Update cflow file generation - support build dir and use $(top_srcdir) 2010-03-29 14:11:17 +00:00
lib Before committing each mda, arrange mdas so ignored mdas get committed first. 2010-06-28 20:35:49 +00:00
libdm Generate liblvm2app and libdevmapper exported symbols from header files. 2010-06-25 18:17:38 +00:00
liblvm Generate liblvm2app and libdevmapper exported symbols from header files. 2010-06-25 18:17:38 +00:00
man Update pvchange, pvs and vgs man pages for metadata ignore. 2010-06-28 20:34:12 +00:00
old-tests Move regex printing code from test to main tree (may use in debug messages). 2010-04-22 17:42:38 +00:00
po INSTALL rules updates 2010-04-09 21:42:48 +00:00
scripts Fix clvmd init script status 2010-06-23 16:24:13 +00:00
test Minor shell style cleanup. 2010-06-28 19:13:33 +00:00
tools Add --metadataignore to pvchange, allowing for ignoring of metadata areas. 2010-06-28 20:33:58 +00:00
udev Fix udev rules to handle spurious events properly. 2010-06-23 17:00:32 +00:00
configure Fix wrong usage of exec_prefix from previous patch introducing LVM_PATH define 2010-06-07 14:31:59 +00:00
configure.in Fix wrong usage of exec_prefix from previous patch introducing LVM_PATH define 2010-06-07 14:31:59 +00:00
COPYING Outline docs 2001-12-31 16:12:40 +00:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in Generate liblvm2app and libdevmapper exported symbols from header files. 2010-06-25 18:17:38 +00:00
Makefile.in Update Copyright date for resently modifed files 2010-05-24 09:04:27 +00:00
README quick review of docs 2008-11-04 17:49:22 +00:00
VERSION post-release 2010-06-23 19:35:11 +00:00
VERSION_DM post-release 2010-06-23 19:35:11 +00:00
WHATS_NEW Fix for bz608048 from Taka... 2010-06-28 14:19:41 +00:00
WHATS_NEW_DM post-release 2010-06-23 19:35:11 +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