1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

callbacks: Miscellaneous fixes for recent changes

This commit is contained in:
Alasdair G Kergon 2018-01-22 15:41:11 +00:00
parent e727da6cf1
commit e869a52cc4
6 changed files with 10 additions and 7 deletions

View File

@ -154,7 +154,7 @@ static int _io(struct device_buffer *devbuf, unsigned ioflags)
}
if (!devbuf->buf && !(devbuf->malloc_address = devbuf->buf = dm_malloc_aligned((size_t) devbuf->where.size, 0))) {
log_error("Bounce buffer malloc failed");
log_error("I/O buffer malloc failed");
return 0;
}

View File

@ -182,7 +182,7 @@ static struct volume_group *_format1_vg_read(struct format_instance *fid,
struct metadata_area *mda __attribute__((unused)),
struct cached_vg_fmtdata **vg_fmtdata __attribute__((unused)),
unsigned *use_previous_vg __attribute__((unused)),
int single_device __attribute__((unused)))
int single_device __attribute__((unused)), unsigned ioflags)
{
struct volume_group *vg;
struct disk_list *dl;

View File

@ -60,7 +60,7 @@ static int _lvm1_read(struct labeller *l, struct device *dev, void *buf, unsigne
struct pv_disk *pvd = (struct pv_disk *) buf;
struct vg_disk vgd;
struct lvmcache_info *info;
struct label *label;
struct label *label = NULL;
const char *vgid = FMT_LVM1_ORPHAN_VG_NAME;
const char *vgname = FMT_LVM1_ORPHAN_VG_NAME;
unsigned exported = 0;

View File

@ -103,7 +103,7 @@ static struct volume_group *_pool_vg_read(struct format_instance *fid,
struct metadata_area *mda __attribute__((unused)),
struct cached_vg_fmtdata **vg_fmtdata __attribute__((unused)),
unsigned *use_previous_vg __attribute__((unused)),
int single_device __attribute__((unused)), int ioflags)
int single_device __attribute__((unused)), unsigned ioflags)
{
struct volume_group *vg;
struct user_subpool *usp;

View File

@ -551,7 +551,7 @@ out:
bad:
if (read_label_callback_fn)
read_label_callback_fn(1, ioflags, read_label_callback_context, label);
read_label_callback_fn(1, ioflags, read_label_callback_context, NULL);
return 0;
}

View File

@ -156,7 +156,7 @@ out:
stack;
if (flp->process_label_data_fn)
flp->process_label_data_fn(0, ioflags, flp->process_label_data_context, NULL);
flp->process_label_data_fn(!flp->ret, ioflags, flp->process_label_data_context, NULL);
}
static void _find_labeller(int failed, unsigned ioflags, void *context, const void *data)
@ -362,7 +362,10 @@ static int _label_read(struct device *dev, uint64_t scan_sector, struct label **
return 0;
}
return flp->ret;
if (process_label_data_fn)
return 1;
else
return flp->ret;
}
/* result may be NULL if caller doesn't need it */