Skip to contentSkip to conversation

partial metadata handling

PATCH New Petr Rockai 1 participant 2 messages May 4, 2008 – May 5, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 partial metadata handling

Hi,

attached is a patch that does the following things:

- implements an _lv_postorder function (that may need a better name, too) -- this will walk the LV dependency graph in depth-first order and in the postorder, call a callback function

- using _lv_postorder, it implements _lv_mark_partial, that decides whether any given LV needs to be marked as partial -- that is, it is incomplete, which generally means, that somewhere down the stack, a PV is missing

- a highlevel function _vg_consolidate_partial, that flags up all partial LVs with a PARTIAL_LV status flag

- fixes the error message in vg_write branch for PARTIAL_VG, telling the user that metadata cannot be updated for partial VG

- add a toolcontext flag handles_partial, that declares that the given tool can cope (and write out) partial metadata; all tools not setting this flag will exhibit the above error message -- and that should be the majority

- the obvious candidate for handles_partial right now is vgreduce --removemissing, but see the next patch for more tool changes

The intention is to have this patch (plus a few tool bits) commited soon enough, as it needs some regression testing and it shouldn't impact current behaviour in any major or negative way. Further bits will then add new functionality on top of these changes, although those still need more work before being commit-ready, I believe.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: partial-metadata-handling.diff
Type: text/x-diff
Size: 14170 bytes
Desc: lvm-partial-metadata-handling.diff
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20080505/c7128726/attachment.bin>
-------------- next part --------------

Yours,
Petr.

Signature · 6 lines
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation
#1 lore raw

PATCH 1/1 partial metadata handling

Hi again...

Quoted 2 lines · Petr Rockai

- the obvious candidate for handles_partial right now is vgreduce --removemissing, but see the next patch for more tool changes

Now that is an obvious nonsense, since --removemissing always writes out consistent, non-partial metadata, so no need for handles_partial. Sorry for the confusion. What I meant is that it can work with partial VGs despite that flag (but the result is a consistent, complete VG).

Yours,
Petr.

Signature · 6 lines
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation