mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add mirror_library description to example.conf.
More compile-time cleanup.
This commit is contained in:
parent
a54b98e5ef
commit
898e6f8e41
@ -1,5 +1,6 @@
|
||||
Version 2.02.06 -
|
||||
=================================
|
||||
Add mirror_library description to example.conf.
|
||||
Fix uuid_from_num() buffer overrun.
|
||||
Make SIZE_SHORT the default for display_size().
|
||||
Fix some memory leaks in error paths found by coverity.
|
||||
|
@ -291,7 +291,13 @@ activation {
|
||||
|
||||
# Event daemon
|
||||
#
|
||||
#dmeventd {
|
||||
# dmeventd {
|
||||
# mirror_library is the library used when monitoring a mirror device.
|
||||
#
|
||||
# "libdevmapper-event-lvm2mirror.so" attempts to recover from failures.
|
||||
# It removes failed devices from a volume group and reconfigures a
|
||||
# mirror as necessary.
|
||||
#
|
||||
# mirror_library = "libdevmapper-event-lvm2mirror.so"
|
||||
#}
|
||||
|
||||
|
@ -862,28 +862,16 @@ int lv_mknodes(struct cmd_context *cmd, const struct logical_volume *lv)
|
||||
* Does PV use VG somewhere in its construction?
|
||||
* Returns 1 on failure.
|
||||
*/
|
||||
int pv_uses_vg(struct cmd_context *cmd, struct physical_volume *pv,
|
||||
int pv_uses_vg(struct physical_volume *pv,
|
||||
struct volume_group *vg)
|
||||
{
|
||||
struct dev_manager *dm;
|
||||
int r;
|
||||
|
||||
if (!activation())
|
||||
return 0;
|
||||
|
||||
if (!dm_is_dm_major(MAJOR(pv->dev->dev)))
|
||||
return 0;
|
||||
|
||||
if (!(dm = dev_manager_create(cmd, vg->name))) {
|
||||
stack;
|
||||
return 1;
|
||||
}
|
||||
|
||||
r = dev_manager_device_uses_vg(dm, pv->dev, vg);
|
||||
|
||||
dev_manager_destroy(dm);
|
||||
|
||||
return r;
|
||||
return dev_manager_device_uses_vg(pv->dev, vg);
|
||||
}
|
||||
|
||||
void activation_exit(void)
|
||||
|
@ -83,7 +83,7 @@ int lvs_in_vg_opened(struct volume_group *vg);
|
||||
/*
|
||||
* Returns 1 if PV has a dependency tree that uses anything in VG.
|
||||
*/
|
||||
int pv_uses_vg(struct cmd_context *cmd, struct physical_volume *pv,
|
||||
int pv_uses_vg(struct physical_volume *pv,
|
||||
struct volume_group *vg);
|
||||
|
||||
#endif
|
||||
|
@ -679,7 +679,7 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
|
||||
(seg_type(seg, s) == AREA_LV && !seg_lv(seg, s)))
|
||||
dm_tree_node_add_target_area(node,
|
||||
dm->stripe_filler,
|
||||
NULL, 0);
|
||||
NULL, UINT64_C(0));
|
||||
else if (seg_type(seg, s) == AREA_PV)
|
||||
dm_tree_node_add_target_area(node,
|
||||
dev_name(seg_dev(seg, s)),
|
||||
@ -704,7 +704,6 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
|
||||
}
|
||||
|
||||
static int _add_origin_target_to_dtree(struct dev_manager *dm,
|
||||
struct dm_tree *dtree,
|
||||
struct dm_tree_node *dnode,
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
@ -720,7 +719,6 @@ static int _add_origin_target_to_dtree(struct dev_manager *dm,
|
||||
}
|
||||
|
||||
static int _add_snapshot_target_to_dtree(struct dev_manager *dm,
|
||||
struct dm_tree *dtree,
|
||||
struct dm_tree_node *dnode,
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
@ -749,7 +747,6 @@ static int _add_snapshot_target_to_dtree(struct dev_manager *dm,
|
||||
}
|
||||
|
||||
static int _add_target_to_dtree(struct dev_manager *dm,
|
||||
struct dm_tree *dtree,
|
||||
struct dm_tree_node *dnode,
|
||||
struct lv_segment *seg)
|
||||
{
|
||||
@ -814,12 +811,12 @@ static int _add_segment_to_dtree(struct dev_manager *dm,
|
||||
|
||||
/* Now we've added its dependencies, we can add the target itself */
|
||||
if (lv_is_origin(seg->lv) && !layer) {
|
||||
if (!_add_origin_target_to_dtree(dm, dtree, dnode, seg->lv))
|
||||
if (!_add_origin_target_to_dtree(dm, dnode, seg->lv))
|
||||
return_0;
|
||||
} else if (lv_is_cow(seg->lv) && !layer) {
|
||||
if (!_add_snapshot_target_to_dtree(dm, dtree, dnode, seg->lv))
|
||||
if (!_add_snapshot_target_to_dtree(dm, dnode, seg->lv))
|
||||
return_0;
|
||||
} else if (!_add_target_to_dtree(dm, dtree, dnode, seg))
|
||||
} else if (!_add_target_to_dtree(dm, dnode, seg))
|
||||
return_0;
|
||||
|
||||
if (lv_is_origin(seg->lv) && !layer)
|
||||
@ -864,10 +861,10 @@ static int _add_new_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
|
||||
* Major/minor settings only apply to the visible layer.
|
||||
*/
|
||||
if (!(dnode = dm_tree_add_new_dev(dtree, name, dlid,
|
||||
layer ? lv->major : 0,
|
||||
layer ? lv->minor : 0,
|
||||
layer ? (uint32_t) lv->major : UINT32_C(0),
|
||||
layer ? (uint32_t) lv->minor : UINT32_C(0),
|
||||
_read_only_lv(lv),
|
||||
lv->vg->status & PRECOMMITTED,
|
||||
(lv->vg->status & PRECOMMITTED) ? 1 : 0,
|
||||
lvlayer)))
|
||||
return_0;
|
||||
|
||||
@ -921,7 +918,7 @@ static int _create_lv_symlinks(struct dev_manager *dm, struct dm_tree_node *root
|
||||
return r;
|
||||
}
|
||||
|
||||
static int _clean_tree(struct dev_manager *dm, struct logical_volume *lv, struct dm_tree_node *root)
|
||||
static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root)
|
||||
{
|
||||
void *handle = NULL;
|
||||
struct dm_tree_node *child;
|
||||
@ -973,7 +970,7 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv, actio
|
||||
switch(action) {
|
||||
case CLEAN:
|
||||
/* Deactivate any unused non-toplevel nodes */
|
||||
if (!_clean_tree(dm, lv, root))
|
||||
if (!_clean_tree(dm, root))
|
||||
goto_out;
|
||||
break;
|
||||
case DEACTIVATE:
|
||||
@ -1056,7 +1053,7 @@ int dev_manager_suspend(struct dev_manager *dm, struct logical_volume *lv)
|
||||
* Does device use VG somewhere in its construction?
|
||||
* Returns 1 if uncertain.
|
||||
*/
|
||||
int dev_manager_device_uses_vg(struct dev_manager *dm, struct device *dev,
|
||||
int dev_manager_device_uses_vg(struct device *dev,
|
||||
struct volume_group *vg)
|
||||
{
|
||||
struct dm_tree *dtree;
|
||||
@ -1069,7 +1066,7 @@ int dev_manager_device_uses_vg(struct dev_manager *dm, struct device *dev,
|
||||
return r;
|
||||
}
|
||||
|
||||
if (!dm_tree_add_dev(dtree, MAJOR(dev->dev), MINOR(dev->dev))) {
|
||||
if (!dm_tree_add_dev(dtree, (uint32_t) MAJOR(dev->dev), (uint32_t) MINOR(dev->dev))) {
|
||||
log_error("Failed to add device %s (%" PRIu32 ":%" PRIu32") to dtree",
|
||||
dev_name(dev), (uint32_t) MAJOR(dev->dev), (uint32_t) MINOR(dev->dev));
|
||||
goto out;
|
||||
|
@ -59,7 +59,7 @@ int dev_manager_lv_rmnodes(const struct logical_volume *lv);
|
||||
*/
|
||||
int dev_manager_execute(struct dev_manager *dm);
|
||||
|
||||
int dev_manager_device_uses_vg(struct dev_manager *dm, struct device *dev,
|
||||
int dev_manager_device_uses_vg(struct device *dev,
|
||||
struct volume_group *vg);
|
||||
|
||||
#endif
|
||||
|
4
lib/cache/lvmcache.c
vendored
4
lib/cache/lvmcache.c
vendored
@ -50,7 +50,7 @@ int lvmcache_init(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void lvmcache_lock_vgname(const char *vgname, int read_only)
|
||||
void lvmcache_lock_vgname(const char *vgname, int read_only __attribute((unused)))
|
||||
{
|
||||
if (!_lock_hash && !lvmcache_init()) {
|
||||
log_error("Internal cache initialisation failed");
|
||||
@ -857,7 +857,7 @@ static void _lvmcache_destroy_vgnamelist(struct lvmcache_vginfo *vginfo)
|
||||
} while ((vginfo = next));
|
||||
}
|
||||
|
||||
static void _lvmcache_destroy_lockname(int present)
|
||||
static void _lvmcache_destroy_lockname(int present __attribute((unused)))
|
||||
{
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ static int _has_partition_table(struct device *dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!dev_read(dev, 0, sizeof(buf), &buf)) {
|
||||
if (!dev_read(dev, UINT64_C(0), sizeof(buf), &buf)) {
|
||||
stack;
|
||||
goto out;
|
||||
}
|
||||
|
@ -38,11 +38,13 @@ static int _errseg_merge_segments(struct lv_segment *seg1, struct lv_segment *se
|
||||
}
|
||||
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
static int _errseg_add_target_line(struct dev_manager *dm, struct dm_pool *mem,
|
||||
struct config_tree *cft, void **target_state,
|
||||
struct lv_segment *seg,
|
||||
static int _errseg_add_target_line(struct dev_manager *dm __attribute((unused)),
|
||||
struct dm_pool *mem __attribute((unused)),
|
||||
struct config_tree *cft __attribute((unused)),
|
||||
void **target_state __attribute((unused)),
|
||||
struct lv_segment *seg __attribute((unused)),
|
||||
struct dm_tree_node *node, uint64_t len,
|
||||
uint32_t *pvmove_mirror_count)
|
||||
uint32_t *pvmove_mirror_count __attribute((unused)))
|
||||
{
|
||||
return dm_tree_node_add_error_target(node, len);
|
||||
}
|
||||
@ -64,7 +66,7 @@ static int _errseg_target_present(void)
|
||||
|
||||
static void _errseg_destroy(const struct segment_type *segtype)
|
||||
{
|
||||
dm_free((void *) segtype);
|
||||
dm_free((void *)segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _error_ops = {
|
||||
|
@ -183,7 +183,8 @@ static int _out_with_comment_file(struct formatter *f, const char *comment,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _out_with_comment_raw(struct formatter *f, const char *comment,
|
||||
static int _out_with_comment_raw(struct formatter *f,
|
||||
const char *comment __attribute((unused)),
|
||||
const char *fmt, va_list ap)
|
||||
{
|
||||
int n;
|
||||
@ -281,7 +282,7 @@ int out_text(struct formatter *f, const char *fmt, ...)
|
||||
}
|
||||
|
||||
static int _print_header(struct formatter *f,
|
||||
struct volume_group *vg, const char *desc)
|
||||
const char *desc)
|
||||
{
|
||||
time_t t;
|
||||
|
||||
@ -665,7 +666,7 @@ static int _text_vg_export(struct formatter *f,
|
||||
}
|
||||
#define fail do {stack; goto out;} while(0)
|
||||
|
||||
if (f->header && !_print_header(f, vg, desc))
|
||||
if (f->header && !_print_header(f, desc))
|
||||
fail;
|
||||
|
||||
if (!out_text(f, "%s {", vg->name))
|
||||
@ -688,7 +689,7 @@ static int _text_vg_export(struct formatter *f,
|
||||
if (!out_text(f, "}"))
|
||||
fail;
|
||||
|
||||
if (!f->header && !_print_header(f, vg, desc))
|
||||
if (!f->header && !_print_header(f, desc))
|
||||
fail;
|
||||
|
||||
#undef fail
|
||||
|
@ -69,7 +69,8 @@ struct text_context {
|
||||
* NOTE: Currently there can be only one vg per text file.
|
||||
*/
|
||||
|
||||
static int _text_vg_setup(struct format_instance *fid, struct volume_group *vg)
|
||||
static int _text_vg_setup(struct format_instance *fid __attribute((unused)),
|
||||
struct volume_group *vg)
|
||||
{
|
||||
if (vg->extent_size & (vg->extent_size - 1)) {
|
||||
log_error("Extent size must be power of 2");
|
||||
@ -79,7 +80,8 @@ static int _text_vg_setup(struct format_instance *fid, struct volume_group *vg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _text_lv_setup(struct format_instance *fid, struct logical_volume *lv)
|
||||
static int _text_lv_setup(struct format_instance *fid __attribute((unused)),
|
||||
struct logical_volume *lv)
|
||||
{
|
||||
/******** FIXME Any LV size restriction?
|
||||
uint64_t max_size = UINT_MAX;
|
||||
@ -1202,7 +1204,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
|
||||
}
|
||||
}
|
||||
if (!add_da
|
||||
(fmt, NULL, &info->das, pv->pe_start << SECTOR_SHIFT, UINT64_C(0))) {
|
||||
(NULL, &info->das, pv->pe_start << SECTOR_SHIFT, UINT64_C(0))) {
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
@ -1339,7 +1341,7 @@ static int _text_pv_read(const struct format_type *fmt, const char *pv_name,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void _text_destroy_instance(struct format_instance *fid)
|
||||
static void _text_destroy_instance(struct format_instance *fid __attribute((unused)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1372,7 +1374,7 @@ static void _text_destroy(const struct format_type *fmt)
|
||||
dm_free(fmt->private);
|
||||
}
|
||||
|
||||
dm_free((void *) fmt);
|
||||
dm_free((void *)fmt);
|
||||
}
|
||||
|
||||
static struct metadata_area_ops _metadata_text_file_ops = {
|
||||
|
@ -46,7 +46,7 @@ struct labeller *text_labeller_create(const struct format_type *fmt);
|
||||
|
||||
int pvhdr_read(struct device *dev, char *buf);
|
||||
|
||||
int add_da(const struct format_type *fmt, struct dm_pool *mem, struct list *das,
|
||||
int add_da(struct dm_pool *mem, struct list *das,
|
||||
uint64_t start, uint64_t size);
|
||||
void del_das(struct list *das);
|
||||
|
||||
|
@ -129,6 +129,6 @@ struct volume_group *text_vg_import_file(struct format_instance *fid,
|
||||
const char *file,
|
||||
time_t *when, char **desc)
|
||||
{
|
||||
return text_vg_import_fd(fid, file, NULL, 0, 0, 0, 0, NULL, 0,
|
||||
return text_vg_import_fd(fid, file, NULL, (off_t)0, 0, (off_t)0, 0, NULL, 0,
|
||||
when, desc);
|
||||
}
|
||||
|
@ -23,7 +23,9 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
static int _text_can_handle(struct labeller *l, char *buf, uint64_t sector)
|
||||
static int _text_can_handle(struct labeller *l __attribute((unused)),
|
||||
char *buf,
|
||||
uint64_t sector __attribute((unused)))
|
||||
{
|
||||
struct label_header *lh = (struct label_header *) buf;
|
||||
|
||||
@ -86,7 +88,7 @@ static int _text_write(struct label *label, char *buf)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int add_da(const struct format_type *fmt, struct dm_pool *mem, struct list *das,
|
||||
int add_da(struct dm_pool *mem, struct list *das,
|
||||
uint64_t start, uint64_t size)
|
||||
{
|
||||
struct data_area_list *dal;
|
||||
@ -179,7 +181,8 @@ void del_mdas(struct list *mdas)
|
||||
}
|
||||
}
|
||||
|
||||
static int _text_initialise_label(struct labeller *l, struct label *label)
|
||||
static int _text_initialise_label(struct labeller *l __attribute((unused)),
|
||||
struct label *label)
|
||||
{
|
||||
strncpy(label->type, LVM2_LABEL, sizeof(label->type));
|
||||
|
||||
@ -220,7 +223,7 @@ static int _text_read(struct labeller *l, struct device *dev, char *buf,
|
||||
/* Data areas holding the PEs */
|
||||
dlocn_xl = pvhdr->disk_areas_xl;
|
||||
while ((offset = xlate64(dlocn_xl->offset))) {
|
||||
add_da(info->fmt, NULL, &info->das, offset,
|
||||
add_da(NULL, &info->das, offset,
|
||||
xlate64(dlocn_xl->size));
|
||||
dlocn_xl++;
|
||||
}
|
||||
@ -248,7 +251,8 @@ static int _text_read(struct labeller *l, struct device *dev, char *buf,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void _text_destroy_label(struct labeller *l, struct label *label)
|
||||
static void _text_destroy_label(struct labeller *l __attribute((unused)),
|
||||
struct label *label)
|
||||
{
|
||||
struct lvmcache_info *info = (struct lvmcache_info *) label->info;
|
||||
|
||||
|
@ -105,7 +105,7 @@ static void _remove_ctrl_c_handler()
|
||||
log_sys_error("signal", "_remove_ctrl_c_handler");
|
||||
}
|
||||
|
||||
static void _trap_ctrl_c(int sig)
|
||||
static void _trap_ctrl_c(int sig __attribute((unused)))
|
||||
{
|
||||
_remove_ctrl_c_handler();
|
||||
log_error("CTRL-c detected: giving up waiting for lock");
|
||||
|
@ -33,7 +33,7 @@ static int _vg_lock_count = 0; /* Number of locks held */
|
||||
static int _vg_write_lock_held = 0; /* VG write lock held? */
|
||||
static int _signals_blocked = 0;
|
||||
|
||||
static void _block_signals(int flags)
|
||||
static void _block_signals(int flags __attribute((unused)))
|
||||
{
|
||||
sigset_t set;
|
||||
|
||||
|
@ -498,7 +498,7 @@ static int _setup_alloced_segment(struct logical_volume *lv, uint32_t status,
|
||||
struct physical_volume *mirrored_pv,
|
||||
uint32_t mirrored_pe,
|
||||
uint32_t region_size,
|
||||
struct logical_volume *log_lv)
|
||||
struct logical_volume *log_lv __attribute((unused)))
|
||||
{
|
||||
uint32_t s, extents, area_multiple, extra_areas = 0;
|
||||
struct lv_segment *seg;
|
||||
|
@ -60,7 +60,7 @@ static int _add_pv_to_vg(struct format_instance *fid, struct volume_group *vg,
|
||||
}
|
||||
|
||||
/* Ensure PV doesn't depend on another PV already in the VG */
|
||||
if (pv_uses_vg(fid->fmt->cmd, pv, vg)) {
|
||||
if (pv_uses_vg(pv, vg)) {
|
||||
log_error("Physical volume %s might be constructed from same "
|
||||
"volume group %s", pv_name, vg->name);
|
||||
return 0;
|
||||
@ -1342,7 +1342,7 @@ struct list *get_pvs(struct cmd_context *cmd)
|
||||
return results;
|
||||
}
|
||||
|
||||
int pv_write(struct cmd_context *cmd, struct physical_volume *pv,
|
||||
int pv_write(struct cmd_context *cmd __attribute((unused)), struct physical_volume *pv,
|
||||
struct list *mdas, int64_t label_sector)
|
||||
{
|
||||
if (!pv->fmt->ops->pv_write) {
|
||||
|
@ -174,7 +174,8 @@ static struct mirror_state *_mirrored_init_target(struct dm_pool *mem,
|
||||
static int _mirrored_target_percent(void **target_state, struct dm_pool *mem,
|
||||
struct config_tree *cft, struct lv_segment *seg,
|
||||
char *params, uint64_t *total_numerator,
|
||||
uint64_t *total_denominator, float *percent)
|
||||
uint64_t *total_denominator,
|
||||
float *percent __attribute((unused)))
|
||||
{
|
||||
struct mirror_state *mirr_state;
|
||||
uint64_t numerator, denominator;
|
||||
|
@ -472,7 +472,8 @@ static int _vgstatus_disp(struct report_handle *rh, struct field *field,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _segtype_disp(struct report_handle *rh, struct field *field,
|
||||
static int _segtype_disp(struct report_handle *rh __attribute((unused)),
|
||||
struct field *field,
|
||||
const void *data)
|
||||
{
|
||||
const struct lv_segment *seg = (const struct lv_segment *) data;
|
||||
|
@ -27,7 +27,7 @@ static const char *_snap_name(const struct lv_segment *seg)
|
||||
}
|
||||
|
||||
static int _snap_text_import(struct lv_segment *seg, const struct config_node *sn,
|
||||
struct dm_hash_table *pv_hash)
|
||||
struct dm_hash_table *pv_hash __attribute((unused)))
|
||||
{
|
||||
uint32_t chunk_size;
|
||||
const char *org_name, *cow_name;
|
||||
@ -87,8 +87,10 @@ static int _snap_text_export(const struct lv_segment *seg, struct formatter *f)
|
||||
}
|
||||
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
static int _snap_target_percent(void **target_state, struct dm_pool *mem,
|
||||
struct config_tree *cft, struct lv_segment *seg,
|
||||
static int _snap_target_percent(void **target_state __attribute((unused)),
|
||||
struct dm_pool *mem __attribute((unused)),
|
||||
struct config_tree *cft __attribute((unused)),
|
||||
struct lv_segment *seg __attribute((unused)),
|
||||
char *params, uint64_t *total_numerator,
|
||||
uint64_t *total_denominator, float *percent)
|
||||
{
|
||||
@ -126,7 +128,7 @@ static int _snap_target_present(void)
|
||||
|
||||
static void _snap_destroy(const struct segment_type *segtype)
|
||||
{
|
||||
dm_free((void *) segtype);
|
||||
dm_free((void *)segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _snapshot_ops = {
|
||||
|
@ -151,11 +151,13 @@ static int _striped_merge_segments(struct lv_segment *seg1, struct lv_segment *s
|
||||
}
|
||||
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
static int _striped_add_target_line(struct dev_manager *dm, struct dm_pool *mem,
|
||||
struct config_tree *cft, void **target_state,
|
||||
static int _striped_add_target_line(struct dev_manager *dm,
|
||||
struct dm_pool *mem __attribute((unused)),
|
||||
struct config_tree *cft __attribute((unused)),
|
||||
void **target_state __attribute((unused)),
|
||||
struct lv_segment *seg,
|
||||
struct dm_tree_node *node, uint64_t len,
|
||||
uint32_t *pvmove_mirror_count)
|
||||
uint32_t *pvmove_mirror_count __attribute((unused)))
|
||||
{
|
||||
if (!seg->area_count) {
|
||||
log_error("Internal error: striped add_target_line called "
|
||||
@ -189,7 +191,7 @@ static int _striped_target_present(void)
|
||||
|
||||
static void _striped_destroy(const struct segment_type *segtype)
|
||||
{
|
||||
dm_free((void *) segtype);
|
||||
dm_free((void *)segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _striped_ops = {
|
||||
|
@ -125,7 +125,7 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to,
|
||||
|
||||
/* Check no PVs are constructed from either VG */
|
||||
list_iterate_items(pvl, &vg_to->pvs) {
|
||||
if (pv_uses_vg(cmd, pvl->pv, vg_from)) {
|
||||
if (pv_uses_vg(pvl->pv, vg_from)) {
|
||||
log_error("Physical volume %s might be constructed "
|
||||
"from same volume group %s.",
|
||||
dev_name(pvl->pv->dev), vg_from->name);
|
||||
@ -134,7 +134,7 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to,
|
||||
}
|
||||
|
||||
list_iterate_items(pvl, &vg_from->pvs) {
|
||||
if (pv_uses_vg(cmd, pvl->pv, vg_to)) {
|
||||
if (pv_uses_vg(pvl->pv, vg_to)) {
|
||||
log_error("Physical volume %s might be constructed "
|
||||
"from same volume group %s.",
|
||||
dev_name(pvl->pv->dev), vg_to->name);
|
||||
|
Loading…
Reference in New Issue
Block a user