1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
lvm2/lib/metadata
Jonathan Earl Brassow 2c33c8b80c Fix for bug 637936: killing both redundant logs causes deadlock
Problem:
When both legs of a mirrored log fail, neither the log nor the parent
mirror can proceed.  The repair code must be careful to replace the
log with an error target before operating on the parent - otherwise,
the parent can get stuck trying to suspend because it can't push through
any writes.  The steps to replace the log device with an error target
were incomplete and resulted in the replacement not happening at all!

The code originally had all the necessary logic to complete the
replacement task, but was pulled out in a effort to clean-up that
section of code, while fixing another bug:
<offending commit msg>
In addition, I added following three changes.

- Removed tmp_orphan_lvs handling procedure
  It seems that _delete_lv() can handle detached_log_lv properly
  without adding mirror legs in mirrored log to tmp_orphan_lvs.
  Therefore, I removed the procedure.

- Removed vg_write()/vg_commit()
  Metadata is saved by vg_write()/vg_commit() just after detached_log_lv
  is handled. Therefore, I removed vg_write()/vg_commit().
</offending commit msg>

http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c?cvsroot=lvm2&f=h#rev1.130

I've reverted the "clean-up" changes associated with that fix, but not what
that commit was actually fixing.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-10-14 20:03:12 +00:00
..
lv_alloc.h Fix pvmove allocation to take existing parallel stripes into account. 2010-04-08 00:28:57 +00:00
lv_manip.c Fix for bug 637936: killing both redundant logs causes deadlock 2010-10-14 20:03:12 +00:00
lv.c Fix lv_modules_dup segfault. 2010-10-12 17:09:23 +00:00
lv.h Refactor and add code for (lv) 'modules' get function. 2010-10-12 16:13:06 +00:00
merge.c Replicator: check replicator segment 2010-05-21 12:43:02 +00:00
metadata-exported.h Make lvconvert respect --yes/--force in the inactive log conversion 2010-10-12 16:41:17 +00:00
metadata.c Don't use floor() in _bitset_with_random_bits 2010-10-13 12:18:53 +00:00
metadata.h Rename 'flags' to 'status' for struct metadata_area. 2010-10-05 17:34:05 +00:00
mirror.c Fix for bug 637936: killing both redundant logs causes deadlock 2010-10-14 20:03:12 +00:00
pv_alloc.h Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_manip.c Fix all segments memory is allocated from vg private mempool. 2010-03-31 17:23:18 +00:00
pv_map.c Allow ALLOC_ANYWHERE to split contiguous areas. 2010-03-25 21:19:26 +00:00
pv_map.h Remove superfluous fn prototypes. 2010-07-09 15:21:10 +00:00
pv.c Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch]. 2010-09-30 20:47:18 +00:00
pv.h Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch]. 2010-09-30 20:47:18 +00:00
replicator_manip.c Replicator: add read and release VGs for rsites 2010-05-21 14:07:16 +00:00
segtype.c Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
segtype.h Convey need for snapshot-merge target in lvconvert error message and man 2010-10-13 21:26:37 +00:00
snapshot_manip.c When removing a snapshot avoid preloading the origin if the 2010-04-23 02:57:39 +00:00
vg.c Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch]. 2010-09-30 20:47:18 +00:00
vg.h Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch]. 2010-09-30 20:47:18 +00:00