mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Thin remove unused define
Remove DM_THIN_ERROR_DEVICE_ID from API. Remove API warning. Drop code that was using DM_THIN_ERROR_DEVICE_ID (already commented) Remove debug message which slipped in through some previous commit.
This commit is contained in:
parent
630b4c2111
commit
6744c143a5
@ -230,8 +230,6 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (!dm_tree_node_add_thin_target(node, len, pool_dlid,
|
|
||||||
// DM_THIN_ERROR_DEVICE_ID))
|
|
||||||
if (!dm_tree_node_add_linear_target(node, len) ||
|
if (!dm_tree_node_add_linear_target(node, len) ||
|
||||||
!dm_tree_node_add_target_area(node, NULL, pool_dlid, 0))
|
!dm_tree_node_add_target_area(node, NULL, pool_dlid, 0))
|
||||||
return_0;
|
return_0;
|
||||||
|
@ -535,7 +535,6 @@ int dm_tree_node_add_replicator_dev_target(struct dm_tree_node *node,
|
|||||||
uint32_t slog_region_size);
|
uint32_t slog_region_size);
|
||||||
/* End of Replicator API */
|
/* End of Replicator API */
|
||||||
|
|
||||||
/* API for thin provisioning is experimental, DO NOT USE. */
|
|
||||||
/*
|
/*
|
||||||
* FIXME: Defines bellow are based on kernel's dm-thin.c defines
|
* FIXME: Defines bellow are based on kernel's dm-thin.c defines
|
||||||
* DATA_DEV_BLOCK_SIZE_MIN_SECTORS (64 * 1024 >> SECTOR_SHIFT)
|
* DATA_DEV_BLOCK_SIZE_MIN_SECTORS (64 * 1024 >> SECTOR_SHIFT)
|
||||||
@ -571,10 +570,6 @@ int dm_tree_node_add_thin_pool_message(struct dm_tree_node *node,
|
|||||||
* MAX_DEV_ID ((1 << 24) - 1)
|
* MAX_DEV_ID ((1 << 24) - 1)
|
||||||
*/
|
*/
|
||||||
#define DM_THIN_MAX_DEVICE_ID (UINT32_C((1 << 24) - 1))
|
#define DM_THIN_MAX_DEVICE_ID (UINT32_C((1 << 24) - 1))
|
||||||
/* Reserved device_id for error (deleted) thin device */
|
|
||||||
// FIXME - only needed for in-delete thin is not activated
|
|
||||||
#define DM_THIN_ERROR_DEVICE_ID (UINT32_MAX)
|
|
||||||
|
|
||||||
int dm_tree_node_add_thin_target(struct dm_tree_node *node,
|
int dm_tree_node_add_thin_target(struct dm_tree_node *node,
|
||||||
uint64_t size,
|
uint64_t size,
|
||||||
const char *pool_uuid,
|
const char *pool_uuid,
|
||||||
|
@ -3018,19 +3018,14 @@ int dm_tree_node_add_thin_target(struct dm_tree_node *node,
|
|||||||
if (!_link_tree_nodes(node, pool))
|
if (!_link_tree_nodes(node, pool))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (device_id == DM_THIN_ERROR_DEVICE_ID) {
|
if (!_thin_validate_device_id(device_id))
|
||||||
if (!dm_tree_node_add_error_target(node, size))
|
return_0;
|
||||||
return_0;
|
|
||||||
} else {
|
|
||||||
if (!_thin_validate_device_id(device_id))
|
|
||||||
return_0;
|
|
||||||
|
|
||||||
if (!(seg = _add_segment(node, SEG_THIN, size)))
|
if (!(seg = _add_segment(node, SEG_THIN, size)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
seg->pool = pool;
|
seg->pool = pool;
|
||||||
seg->device_id = device_id;
|
seg->device_id = device_id;
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,6 @@ static void _read_history(struct cmd_context *cmd)
|
|||||||
|
|
||||||
stifle_history(find_config_tree_int(cmd, "shell/history_size",
|
stifle_history(find_config_tree_int(cmd, "shell/history_size",
|
||||||
DEFAULT_MAX_HISTORY));
|
DEFAULT_MAX_HISTORY));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _write_history(void)
|
static void _write_history(void)
|
||||||
|
@ -329,7 +329,6 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
dm_list_iterate_items(sll, &arg_lvnames) {
|
dm_list_iterate_items(sll, &arg_lvnames) {
|
||||||
const char *vg_name = sll->str;
|
const char *vg_name = sll->str;
|
||||||
const char *lv_name = strchr(vg_name, '/');
|
const char *lv_name = strchr(vg_name, '/');
|
||||||
log_error("VGNAME strdup %p %s %s", lv_name, vg_name, vgname);
|
|
||||||
|
|
||||||
if ((!lv_name && !strcmp(vg_name, vgname))) {
|
if ((!lv_name && !strcmp(vg_name, vgname))) {
|
||||||
/* Process all LVs in this VG */
|
/* Process all LVs in this VG */
|
||||||
|
Loading…
Reference in New Issue
Block a user