All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Fix lv-seg relationship on layer removal
@ 2008-02-21 17:04 Jun'ichi Nomura
  2008-02-23  8:44 ` Jim Meyering
  0 siblings, 1 reply; 2+ messages in thread
From: Jun'ichi Nomura @ 2008-02-21 17:04 UTC (permalink / raw)
  To: lvm-devel

When a layer is removed, a linear-mapping segment of its parent
is discarded and segments of the layer are moved to the parent LV.

To discard the linear-mapping layer properly,
we need to call lv_empty() for the parent to release the layer.
Otherwise, the layer LV still has the discarded linear segment
in its segs_using_this_lv list.
(Though it might not have any visible effect because the layer
 is eventually removed.)

Thanks Milan Broz for finding this bug.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: empty-parent-before-layer-removal.patch
Type: text/x-patch
Size: 912 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20080221/146aa820/attachment.bin>

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

* [PATCH 2/2] Fix lv-seg relationship on layer removal
  2008-02-21 17:04 [PATCH 2/2] Fix lv-seg relationship on layer removal Jun'ichi Nomura
@ 2008-02-23  8:44 ` Jim Meyering
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Meyering @ 2008-02-23  8:44 UTC (permalink / raw)
  To: lvm-devel

"Jun'ichi Nomura" <j-nomura@ce.jp.nec.com> wrote:
> When removing a layer, segments are moved from the layer LV to
> the original LV (parent).
> Before doing that, call lv_empty() to cleanup the parent and
> any relationships.
>
> Without this, the relationship between the layer_lv and parent remains
> and lvconvert will fail, for example:
>
> # lvconvert -m-1 vg/lvol0
>   LV lvol0_mimagetmp_2 used by LV lvol0:0-511, but is not listed in LV lvol0 segments list.
>   Internal error: LV segments corrupted in lvol0_mimagetmp_2.
>   intermediate VG write failed.

Hi Jun'ichi,

Would you please consider writing (or just outlining) a test case
that fails without yesterday's change, but succeeds with it?

Future maintainers will be grateful :-)



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

end of thread, other threads:[~2008-02-23  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 17:04 [PATCH 2/2] Fix lv-seg relationship on layer removal Jun'ichi Nomura
2008-02-23  8:44 ` Jim Meyering

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.