1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
lvm2/lib
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
..
activate Convey need for snapshot-merge target in lvconvert error message and man 2010-10-13 21:26:37 +00:00
cache Add dm_zalloc and use it and dm_pool_zalloc throughout. 2010-09-30 21:06:50 +00:00
commands Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00
config Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00
datastruct Remove unnecessary / duplicate dm_list macros and functions. 2009-11-25 20:44:07 +00:00
device Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00
display Allow internal suspend and resume of origin without its snapshots. 2010-08-17 16:25:32 +00:00
error Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
filters Add dm_zalloc and use it and dm_pool_zalloc throughout. 2010-09-30 21:06:50 +00:00
format1 Rename 'flags' to 'status' for struct metadata_area. 2010-10-05 17:34:05 +00:00
format_pool Rename 'flags' to 'status' for struct metadata_area. 2010-10-05 17:34:05 +00:00
format_text Rename 'flags' to 'status' for struct metadata_area. 2010-10-05 17:34:05 +00:00
freeseg Fix reporting of LV fields alongside unallocated PV segments. 2008-06-25 16:52:27 +00:00
label Add dm_zalloc and use it and dm_pool_zalloc throughout. 2010-09-30 21:06:50 +00:00
locking Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00
log Various cleanups following recent commits. 2010-06-21 15:56:57 +00:00
metadata Fix for bug 637936: killing both redundant logs causes deadlock 2010-10-14 20:03:12 +00:00
mirror Allow internal suspend and resume of origin without its snapshots. 2010-08-17 16:25:32 +00:00
misc Limit repeated accesses to broken devices. 2010-10-13 15:40:38 +00:00
mm Maps fix 2010-09-30 11:32:40 +00:00
replicator Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
report Refactor and add code for (lv) 'modules' get function. 2010-10-12 16:13:06 +00:00
snapshot Convey need for snapshot-merge target in lvconvert error message and man 2010-10-13 21:26:37 +00:00
striped Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
unknown Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
uuid Add id_format_and_copy() common function and call from _uuid_disp. 2010-09-30 14:07:33 +00:00
zero Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
Makefile.in Refactor metadata.[ch] into lv.[ch] for lv functions. 2010-09-30 13:05:45 +00:00