1
0
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:
Alasdair Kergon 2006-10-18 18:01:53 +00:00
parent 38a5f0b6e8
commit 7c5ec12630
11 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.13 - Version 2.02.13 -
=================================== ===================================
Add segment parameter to target_present functions.
Version 2.02.12 - 16th October 2006 Version 2.02.12 - 16th October 2006
=================================== ===================================

View File

@ -785,7 +785,7 @@ static int _add_segment_to_dtree(struct dev_manager *dm,
/* Ensure required device-mapper targets are loaded */ /* Ensure required device-mapper targets are loaded */
if (seg->segtype->ops->target_present && 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 " log_error("Can't expand LV %s: %s target support missing "
"from kernel?", seg->lv->name, seg->segtype->name); "from kernel?", seg->lv->name, seg->segtype->name);
return 0; return 0;

View File

@ -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); 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_checked = 0;
static int _errseg_present = 0; static int _errseg_present = 0;

View File

@ -562,7 +562,7 @@ int insert_pvmove_mirrors(struct cmd_context *cmd,
} }
if (activation() && segtype->ops->target_present && if (activation() && segtype->ops->target_present &&
!segtype->ops->target_present()) { !segtype->ops->target_present(NULL)) {
log_error("%s: Required device-mapper target(s) not " log_error("%s: Required device-mapper target(s) not "
"detected in your kernel", segtype->name); "detected in your kernel", segtype->name);
return 0; return 0;

View File

@ -76,7 +76,7 @@ struct segtype_handler {
struct lv_segment *seg, char *params, struct lv_segment *seg, char *params,
uint64_t *total_numerator, uint64_t *total_numerator,
uint64_t *total_denominator, float *percent); 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, int (*modules_needed) (struct dm_pool *mem,
const struct lv_segment *seg, const struct lv_segment *seg,
struct list *modules); struct list *modules);

View File

@ -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); 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_checked = 0;
static int _mirrored_present = 0; static int _mirrored_present = 0;

View File

@ -112,7 +112,7 @@ static int _snap_target_percent(void **target_state __attribute((unused)),
return 1; 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_checked = 0;
static int _snap_present = 0; static int _snap_present = 0;

View File

@ -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); 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_checked = 0;
static int _striped_present = 0; static int _striped_present = 0;

View File

@ -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); 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_checked = 0;
static int _zero_present = 0; static int _zero_present = 0;

View File

@ -212,7 +212,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
} }
if (activation() && lp->segtype->ops->target_present && 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 " log_error("%s: Required device-mapper target(s) not "
"detected in your kernel", lp->segtype->name); "detected in your kernel", lp->segtype->name);
return 0; return 0;

View File

@ -386,7 +386,7 @@ static int _lvcreate_params(struct lvcreate_params *lp, struct cmd_context *cmd,
} }
if (activation() && lp->segtype->ops->target_present && 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 " log_error("%s: Required device-mapper target(s) not "
"detected in your kernel", lp->segtype->name); "detected in your kernel", lp->segtype->name);
return 0; return 0;