mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add segment parameter to target_present functions.
This commit is contained in:
parent
38a5f0b6e8
commit
7c5ec12630
@ -1,5 +1,6 @@
|
||||
Version 2.02.13 -
|
||||
===================================
|
||||
Add segment parameter to target_present functions.
|
||||
|
||||
Version 2.02.12 - 16th October 2006
|
||||
===================================
|
||||
|
@ -785,7 +785,7 @@ static int _add_segment_to_dtree(struct dev_manager *dm,
|
||||
|
||||
/* Ensure required device-mapper targets are loaded */
|
||||
if (seg->segtype->ops->target_present &&
|
||||
!seg->segtype->ops->target_present()) {
|
||||
!seg->segtype->ops->target_present(seg)) {
|
||||
log_error("Can't expand LV %s: %s target support missing "
|
||||
"from kernel?", seg->lv->name, seg->segtype->name);
|
||||
return 0;
|
||||
|
@ -50,7 +50,7 @@ static int _errseg_add_target_line(struct dev_manager *dm __attribute((unused)),
|
||||
return dm_tree_node_add_error_target(node, len);
|
||||
}
|
||||
|
||||
static int _errseg_target_present(void)
|
||||
static int _errseg_target_present(const struct lv_segment *seg __attribute((unused)))
|
||||
{
|
||||
static int _errseg_checked = 0;
|
||||
static int _errseg_present = 0;
|
||||
|
@ -562,7 +562,7 @@ int insert_pvmove_mirrors(struct cmd_context *cmd,
|
||||
}
|
||||
|
||||
if (activation() && segtype->ops->target_present &&
|
||||
!segtype->ops->target_present()) {
|
||||
!segtype->ops->target_present(NULL)) {
|
||||
log_error("%s: Required device-mapper target(s) not "
|
||||
"detected in your kernel", segtype->name);
|
||||
return 0;
|
||||
|
@ -76,7 +76,7 @@ struct segtype_handler {
|
||||
struct lv_segment *seg, char *params,
|
||||
uint64_t *total_numerator,
|
||||
uint64_t *total_denominator, float *percent);
|
||||
int (*target_present) (void);
|
||||
int (*target_present) (const struct lv_segment *seg);
|
||||
int (*modules_needed) (struct dm_pool *mem,
|
||||
const struct lv_segment *seg,
|
||||
struct list *modules);
|
||||
|
@ -336,7 +336,7 @@ static int _mirrored_add_target_line(struct dev_manager *dm, struct dm_pool *mem
|
||||
return add_areas_line(dm, seg, node, start_area, area_count);
|
||||
}
|
||||
|
||||
static int _mirrored_target_present(void)
|
||||
static int _mirrored_target_present(const struct lv_segment *seg __attribute((unused)))
|
||||
{
|
||||
static int _mirrored_checked = 0;
|
||||
static int _mirrored_present = 0;
|
||||
|
@ -112,7 +112,7 @@ static int _snap_target_percent(void **target_state __attribute((unused)),
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int _snap_target_present(void)
|
||||
static int _snap_target_present(const struct lv_segment *seg __attribute((unused)))
|
||||
{
|
||||
static int _snap_checked = 0;
|
||||
static int _snap_present = 0;
|
||||
|
@ -174,7 +174,7 @@ static int _striped_add_target_line(struct dev_manager *dm,
|
||||
return add_areas_line(dm, seg, node, 0u, seg->area_count);
|
||||
}
|
||||
|
||||
static int _striped_target_present(void)
|
||||
static int _striped_target_present(const struct lv_segment *seg __attribute((unused)))
|
||||
{
|
||||
static int _striped_checked = 0;
|
||||
static int _striped_present = 0;
|
||||
|
@ -49,7 +49,7 @@ static int _zero_add_target_line(struct dev_manager *dm __attribute((unused)),
|
||||
return dm_tree_node_add_zero_target(node, len);
|
||||
}
|
||||
|
||||
static int _zero_target_present(void)
|
||||
static int _zero_target_present(const struct lv_segment *seg __attribute((unused)))
|
||||
{
|
||||
static int _zero_checked = 0;
|
||||
static int _zero_present = 0;
|
||||
|
@ -212,7 +212,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
|
||||
}
|
||||
|
||||
if (activation() && lp->segtype->ops->target_present &&
|
||||
!lp->segtype->ops->target_present()) {
|
||||
!lp->segtype->ops->target_present(NULL)) {
|
||||
log_error("%s: Required device-mapper target(s) not "
|
||||
"detected in your kernel", lp->segtype->name);
|
||||
return 0;
|
||||
|
@ -386,7 +386,7 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
|
||||
}
|
||||
|
||||
if (activation() && lp->segtype->ops->target_present &&
|
||||
!lp->segtype->ops->target_present()) {
|
||||
!lp->segtype->ops->target_present(NULL)) {
|
||||
log_error("%s: Required device-mapper target(s) not "
|
||||
"detected in your kernel", lp->segtype->name);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user