mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
callbacks: Miscellaneous fixes for recent changes
This commit is contained in:
parent
e727da6cf1
commit
e869a52cc4
@ -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))) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ static struct volume_group *_format1_vg_read(struct format_instance *fid,
|
|||||||
struct metadata_area *mda __attribute__((unused)),
|
struct metadata_area *mda __attribute__((unused)),
|
||||||
struct cached_vg_fmtdata **vg_fmtdata __attribute__((unused)),
|
struct cached_vg_fmtdata **vg_fmtdata __attribute__((unused)),
|
||||||
unsigned *use_previous_vg __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 volume_group *vg;
|
||||||
struct disk_list *dl;
|
struct disk_list *dl;
|
||||||
|
@ -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 pv_disk *pvd = (struct pv_disk *) buf;
|
||||||
struct vg_disk vgd;
|
struct vg_disk vgd;
|
||||||
struct lvmcache_info *info;
|
struct lvmcache_info *info;
|
||||||
struct label *label;
|
struct label *label = NULL;
|
||||||
const char *vgid = FMT_LVM1_ORPHAN_VG_NAME;
|
const char *vgid = FMT_LVM1_ORPHAN_VG_NAME;
|
||||||
const char *vgname = FMT_LVM1_ORPHAN_VG_NAME;
|
const char *vgname = FMT_LVM1_ORPHAN_VG_NAME;
|
||||||
unsigned exported = 0;
|
unsigned exported = 0;
|
||||||
|
@ -103,7 +103,7 @@ static struct volume_group *_pool_vg_read(struct format_instance *fid,
|
|||||||
struct metadata_area *mda __attribute__((unused)),
|
struct metadata_area *mda __attribute__((unused)),
|
||||||
struct cached_vg_fmtdata **vg_fmtdata __attribute__((unused)),
|
struct cached_vg_fmtdata **vg_fmtdata __attribute__((unused)),
|
||||||
unsigned *use_previous_vg __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 volume_group *vg;
|
||||||
struct user_subpool *usp;
|
struct user_subpool *usp;
|
||||||
|
@ -551,7 +551,7 @@ out:
|
|||||||
|
|
||||||
bad:
|
bad:
|
||||||
if (read_label_callback_fn)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ out:
|
|||||||
stack;
|
stack;
|
||||||
|
|
||||||
if (flp->process_label_data_fn)
|
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)
|
static void _find_labeller(int failed, unsigned ioflags, void *context, const void *data)
|
||||||
@ -362,6 +362,9 @@ static int _label_read(struct device *dev, uint64_t scan_sector, struct label **
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process_label_data_fn)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
return flp->ret;
|
return flp->ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user