1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

format_text: Change update_mda_baton to use label not labeller

This commit is contained in:
Alasdair G Kergon 2018-01-15 20:13:53 +00:00
parent b825987b2f
commit 73b5ee64e7

View File

@ -321,7 +321,7 @@ static int _text_initialise_label(struct labeller *l __attribute__((unused)),
struct update_mda_baton {
struct lvmcache_info *info;
struct labeller *labeller;
struct label *label;
int nr_outstanding_mdas;
lvm_callback_fn_t read_label_callback_fn;
void *read_label_callback_context;
@ -362,7 +362,7 @@ static void _process_mda_header(int failed, void *context, const void *data)
struct process_mda_header_params *pmp = context;
const struct mda_header *mdah = data;
struct update_mda_baton *umb = pmp->umb;
const struct format_type *fmt = umb->labeller->fmt;
const struct format_type *fmt = umb->label->labeller->fmt;
struct metadata_area *mda = pmp->mda;
struct mda_context *mdac = (struct mda_context *) mda->metadata_locn;
@ -394,8 +394,8 @@ static int _update_mda(struct metadata_area *mda, void *baton)
{
struct process_mda_header_params *pmp;
struct update_mda_baton *umb = baton;
const struct format_type *fmt = umb->labeller->fmt;
struct dm_pool *mem = umb->labeller->fmt->cmd->mem;
const struct format_type *fmt = umb->label->labeller->fmt;
struct dm_pool *mem = umb->label->labeller->fmt->cmd->mem;
struct mda_context *mdac = (struct mda_context *) mda->metadata_locn;
if (!(pmp = dm_pool_zalloc(mem, sizeof(*pmp)))) {
@ -512,7 +512,7 @@ out:
}
umb->info = info;
umb->labeller = label->labeller;
umb->label = label;
umb->read_label_callback_fn = read_label_callback_fn;
umb->read_label_callback_context = read_label_callback_context;
umb->nr_outstanding_mdas = 1;