diff options
author | Alasdair Kergon <agk@redhat.com> | 2002-04-24 18:20:51 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2002-04-24 18:20:51 +0000 |
commit | 25b733809adcd2f6a8f288c100085068094dcc8a (patch) | |
tree | de7aea488a1c717d589134b324c664ba4aa505a7 /lib/label/label.c | |
parent | f06bdc437d7eab9569f80ba40cbfca55ffa27104 (diff) | |
download | lvm2-25b733809adcd2f6a8f288c100085068094dcc8a.tar.gz lvm2-25b733809adcd2f6a8f288c100085068094dcc8a.tar.xz lvm2-25b733809adcd2f6a8f288c100085068094dcc8a.zip |
Merge with text format branch.
Lots of changes/very little testing so far => there'll be bugs!
Use 'vgcreate -M text' to create a volume group with its metadata stored
in text files. Text format metadata changes should be reasonably atomic,
with a (basic) automatic recovery mechanism if the system crashes while a
change is in progress.
Add a metadata section to lvm.conf to specify multiple directories if
you want (recommended) to keep multiple copies of the metadata (eg on
different filesystems).
e.g. metadata {
dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"]
}
Plenty of refinements still in the pipeline.
Diffstat (limited to 'lib/label/label.c')
-rw-r--r-- | lib/label/label.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/label/label.c b/lib/label/label.c index be2bcefa..dcc523ec 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -21,7 +21,6 @@ struct labeller_i { static struct list _labellers; - static struct labeller_i *_alloc_li(const char *name, struct labeller *l) { struct labeller_i *li; @@ -45,7 +44,6 @@ static void _free_li(struct labeller_i *li) dbg_free(li); } - int label_init(void) { list_init(&_labellers); @@ -82,7 +80,7 @@ struct labeller *label_get_handler(const char *name) struct list *lih; struct labeller_i *li; - list_iterate (lih, &_labellers) { + list_iterate(lih, &_labellers) { li = list_item(lih, struct labeller_i); if (!strcmp(li->name, name)) return li->l; @@ -96,7 +94,7 @@ static struct labeller *_find_labeller(struct device *dev) struct list *lih; struct labeller_i *li; - list_iterate (lih, &_labellers) { + list_iterate(lih, &_labellers) { li = list_item(lih, struct labeller_i); if (li->l->ops->can_handle(li->l, dev)) return li->l; @@ -124,7 +122,7 @@ int label_read(struct device *dev, struct label **result) struct list *lih; struct labeller_i *li; - list_iterate (lih, &_labellers) { + list_iterate(lih, &_labellers) { li = list_item(lih, struct labeller_i); if ((r = li->l->ops->read(li->l, dev, result))) { (*result)->labeller = li->l; |