The lv_hash wasn't being passed to the seg-specific text import
functions, so they were doing many find_lv() calls which consumes
a lot of time when there are many LVs in the metadata.
12 files changed:
static int _cache_pool_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _cache_pool_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
struct logical_volume *data_lv, *meta_lv;
const char *str = NULL;
{
struct logical_volume *data_lv, *meta_lv;
const char *str = NULL;
return SEG_LOG_ERROR("Cache data not specified in");
if (!(str = dm_config_find_str(sn, "data", NULL)))
return SEG_LOG_ERROR("Cache data must be a string in");
return SEG_LOG_ERROR("Cache data not specified in");
if (!(str = dm_config_find_str(sn, "data", NULL)))
return SEG_LOG_ERROR("Cache data must be a string in");
- if (!(data_lv = find_lv(seg->lv->vg, str)))
+ if (!(data_lv = dm_hash_lookup(lv_hash, str)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache data in", str);
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache data in", str);
return SEG_LOG_ERROR("Cache metadata not specified in");
if (!(str = dm_config_find_str(sn, "metadata", NULL)))
return SEG_LOG_ERROR("Cache metadata must be a string in");
return SEG_LOG_ERROR("Cache metadata not specified in");
if (!(str = dm_config_find_str(sn, "metadata", NULL)))
return SEG_LOG_ERROR("Cache metadata must be a string in");
- if (!(meta_lv = find_lv(seg->lv->vg, str)))
+ if (!(meta_lv = dm_hash_lookup(lv_hash, str)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache metadata in", str);
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache metadata in", str);
static int _cache_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _cache_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
struct logical_volume *pool_lv, *origin_lv;
const char *name;
{
struct logical_volume *pool_lv, *origin_lv;
const char *name;
return SEG_LOG_ERROR("cache_pool not specified in");
if (!(name = dm_config_find_str(sn, "cache_pool", NULL)))
return SEG_LOG_ERROR("cache_pool must be a string in");
return SEG_LOG_ERROR("cache_pool not specified in");
if (!(name = dm_config_find_str(sn, "cache_pool", NULL)))
return SEG_LOG_ERROR("cache_pool must be a string in");
- if (!(pool_lv = find_lv(seg->lv->vg, name)))
+ if (!(pool_lv = dm_hash_lookup(lv_hash, name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache_pool in", name);
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache_pool in", name);
return SEG_LOG_ERROR("Cache origin not specified in");
if (!(name = dm_config_find_str(sn, "origin", NULL)))
return SEG_LOG_ERROR("Cache origin must be a string in");
return SEG_LOG_ERROR("Cache origin not specified in");
if (!(name = dm_config_find_str(sn, "origin", NULL)))
return SEG_LOG_ERROR("Cache origin must be a string in");
- if (!(origin_lv = find_lv(seg->lv->vg, name)))
+ if (!(origin_lv = dm_hash_lookup(lv_hash, name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache origin in", name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache origin in", name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
struct format_instance *fid,
struct dm_pool *mem,
struct logical_volume *lv, const struct dm_config_node *sn,
struct format_instance *fid,
struct dm_pool *mem,
struct logical_volume *lv, const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ struct dm_hash_table *lv_hash)
{
uint32_t area_count = 0u;
struct lv_segment *seg;
{
uint32_t area_count = 0u;
struct lv_segment *seg;
}
if (seg->segtype->ops->text_import &&
}
if (seg->segtype->ops->text_import &&
- !seg->segtype->ops->text_import(seg, sn_child, pv_hash))
+ !seg->segtype->ops->text_import(seg, sn_child, pv_hash, lv_hash))
return_0;
/* Optional tags */
return_0;
/* Optional tags */
struct format_instance *fid,
struct dm_pool *mem,
struct logical_volume *lv, const struct dm_config_node *lvn,
struct format_instance *fid,
struct dm_pool *mem,
struct logical_volume *lv, const struct dm_config_node *lvn,
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ struct dm_hash_table *lv_hash)
{
const struct dm_config_node *sn;
int count = 0, seg_count;
{
const struct dm_config_node *sn;
int count = 0, seg_count;
* All sub-sections are assumed to be segments.
*/
if (!sn->v) {
* All sub-sections are assumed to be segments.
*/
if (!sn->v) {
- if (!_read_segment(cmd, fmt, fid, mem, lv, sn, pv_hash))
+ if (!_read_segment(cmd, fmt, fid, mem, lv, sn, pv_hash, lv_hash))
memcpy(&lv->lvid.id[0], &lv->vg->id, sizeof(lv->lvid.id[0]));
memcpy(&lv->lvid.id[0], &lv->vg->id, sizeof(lv->lvid.id[0]));
- if (!_read_segments(cmd, fmt, fid, mem, lv, lvn, pv_hash))
+ if (!_read_segments(cmd, fmt, fid, mem, lv, lvn, pv_hash, lv_hash))
return_0;
lv->size = (uint64_t) lv->le_count * (uint64_t) vg->extent_size;
return_0;
lv->size = (uint64_t) lv->le_count * (uint64_t) vg->extent_size;
static int _integrity_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _integrity_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
struct integrity_settings *set;
struct logical_volume *origin_lv = NULL;
{
struct integrity_settings *set;
struct logical_volume *origin_lv = NULL;
if (!dm_config_get_str(sn, "origin", &origin_name))
return SEG_LOG_ERROR("origin must be a string in");
if (!dm_config_get_str(sn, "origin", &origin_name))
return SEG_LOG_ERROR("origin must be a string in");
- if (!(origin_lv = find_lv(seg->lv->vg, origin_name)))
+ if (!(origin_lv = dm_hash_lookup(lv_hash, origin_name)))
return SEG_LOG_ERROR("Unknown LV specified for integrity origin %s in", origin_name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
return SEG_LOG_ERROR("Unknown LV specified for integrity origin %s in", origin_name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
if (!dm_config_get_str(sn, "meta_dev", &meta_dev))
return SEG_LOG_ERROR("meta_dev must be a string in");
if (!dm_config_get_str(sn, "meta_dev", &meta_dev))
return SEG_LOG_ERROR("meta_dev must be a string in");
- if (!(meta_lv = find_lv(seg->lv->vg, meta_dev)))
+ if (!(meta_lv = dm_hash_lookup(lv_hash, meta_dev)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for integrity in", meta_dev);
}
return SEG_LOG_ERROR("Unknown logical volume %s specified for integrity in", meta_dev);
}
uint32_t *area_count);
int (*text_import) (struct lv_segment * seg,
const struct dm_config_node * sn,
uint32_t *area_count);
int (*text_import) (struct lv_segment * seg,
const struct dm_config_node * sn,
- struct dm_hash_table * pv_hash);
+ struct dm_hash_table * pv_hash,
+ struct dm_hash_table * lv_hash);
int (*merge_segments) (struct lv_segment * seg1,
struct lv_segment * seg2);
int (*add_target_line) (struct dev_manager *dm, struct dm_pool *mem,
int (*merge_segments) (struct lv_segment * seg1,
struct lv_segment * seg2);
int (*add_target_line) (struct dev_manager *dm, struct dm_pool *mem,
}
static int _mirrored_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
}
static int _mirrored_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ struct dm_hash_table *lv_hash)
{
const struct dm_config_value *cv;
const char *logname = NULL;
{
const struct dm_config_value *cv;
const char *logname = NULL;
}
if (dm_config_get_str(sn, "mirror_log", &logname)) {
}
if (dm_config_get_str(sn, "mirror_log", &logname)) {
- if (!(seg->log_lv = find_lv(seg->lv->vg, logname))) {
+ if (!(seg->log_lv = dm_hash_lookup(lv_hash, logname))) {
log_error("Unrecognised mirror log in "
"segment %s of logical volume %s.",
dm_config_parent_name(sn), seg->lv->name);
log_error("Unrecognised mirror log in "
"segment %s of logical volume %s.",
dm_config_parent_name(sn), seg->lv->name);
static int _raid_text_import_areas(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _raid_text_import_areas(struct lv_segment *seg,
const struct dm_config_node *sn,
- const struct dm_config_value *cv)
+ const struct dm_config_value *cv,
+ struct dm_hash_table *lv_hash)
{
unsigned int s;
struct logical_volume *lv;
{
unsigned int s;
struct logical_volume *lv;
}
/* Metadata device comes first. */
}
/* Metadata device comes first. */
- if (!(lv = find_lv(seg->lv->vg, cv->v.str))) {
+ if (!(lv = dm_hash_lookup(lv_hash, cv->v.str))) {
log_error("Couldn't find volume '%s' for segment '%s'.",
cv->v.str ? : "NULL", seg_name);
return 0;
log_error("Couldn't find volume '%s' for segment '%s'.",
cv->v.str ? : "NULL", seg_name);
return 0;
}
/* Data device comes second */
}
/* Data device comes second */
- if (!(lv = find_lv(seg->lv->vg, cv->v.str))) {
+ if (!(lv = dm_hash_lookup(lv_hash, cv->v.str))) {
log_error("Couldn't find volume '%s' for segment '%s'.",
cv->v.str ? : "NULL", seg_name);
return 0;
log_error("Couldn't find volume '%s' for segment '%s'.",
cv->v.str ? : "NULL", seg_name);
return 0;
static int _raid_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _raid_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ struct dm_hash_table *lv_hash)
{
const struct dm_config_value *cv;
const struct {
{
const struct dm_config_value *cv;
const struct {
- if (!_raid_text_import_areas(seg, sn, cv)) {
+ if (!_raid_text_import_areas(seg, sn, cv, lv_hash)) {
log_error("Failed to import RAID component pairs.");
return 0;
}
log_error("Failed to import RAID component pairs.");
return 0;
}
}
static int _snap_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
}
static int _snap_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
uint32_t chunk_size;
struct logical_volume *org, *cow;
{
uint32_t chunk_size;
struct logical_volume *org, *cow;
if (!(org_name = dm_config_find_str(sn, "origin", NULL)))
return SEG_LOG_ERROR("Snapshot origin must be a string in");
if (!(org_name = dm_config_find_str(sn, "origin", NULL)))
return SEG_LOG_ERROR("Snapshot origin must be a string in");
- if (!(cow = find_lv(seg->lv->vg, cow_name)))
+ if (!(cow = dm_hash_lookup(lv_hash, cow_name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"snapshot cow store in", cow_name);
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"snapshot cow store in", cow_name);
- if (!(org = find_lv(seg->lv->vg, org_name)))
+ if (!(org = dm_hash_lookup(lv_hash, org_name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"snapshot origin in", org_name);
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"snapshot origin in", org_name);
}
static int _striped_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
}
static int _striped_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ struct dm_hash_table *lv_hash)
{
const struct dm_config_value *cv;
{
const struct dm_config_value *cv;
static int _thin_pool_add_message(struct lv_segment *seg,
const char *key,
static int _thin_pool_add_message(struct lv_segment *seg,
const char *key,
- const struct dm_config_node *sn)
+ const struct dm_config_node *sn,
+ struct dm_hash_table *lv_hash)
{
const char *lv_name = NULL;
struct logical_volume *lv = NULL;
{
const char *lv_name = NULL;
struct logical_volume *lv = NULL;
/* Message must have only one from: create, delete */
if (dm_config_get_str(sn, "create", &lv_name)) {
/* Message must have only one from: create, delete */
if (dm_config_get_str(sn, "create", &lv_name)) {
- if (!(lv = find_lv(seg->lv->vg, lv_name)))
+ if (!(lv = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown LV %s for create message in",
lv_name);
/* FIXME: switch to _SNAP later, if the created LV has an origin */
return SEG_LOG_ERROR("Unknown LV %s for create message in",
lv_name);
/* FIXME: switch to _SNAP later, if the created LV has an origin */
static int _thin_pool_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _thin_pool_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
const char *lv_name;
struct logical_volume *pool_data_lv, *pool_metadata_lv;
{
const char *lv_name;
struct logical_volume *pool_data_lv, *pool_metadata_lv;
if (!dm_config_get_str(sn, "metadata", &lv_name))
return SEG_LOG_ERROR("Metadata must be a string in");
if (!dm_config_get_str(sn, "metadata", &lv_name))
return SEG_LOG_ERROR("Metadata must be a string in");
- if (!(pool_metadata_lv = find_lv(seg->lv->vg, lv_name)))
+ if (!(pool_metadata_lv = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown metadata %s in", lv_name);
if (!dm_config_get_str(sn, "pool", &lv_name))
return SEG_LOG_ERROR("Pool must be a string in");
return SEG_LOG_ERROR("Unknown metadata %s in", lv_name);
if (!dm_config_get_str(sn, "pool", &lv_name))
return SEG_LOG_ERROR("Pool must be a string in");
- if (!(pool_data_lv = find_lv(seg->lv->vg, lv_name)))
+ if (!(pool_data_lv = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown pool %s in", lv_name);
if (!attach_pool_data_lv(seg, pool_data_lv))
return SEG_LOG_ERROR("Unknown pool %s in", lv_name);
if (!attach_pool_data_lv(seg, pool_data_lv))
/* Read messages */
for (; sn; sn = sn->sib)
/* Read messages */
for (; sn; sn = sn->sib)
- if (!(sn->v) && !_thin_pool_add_message(seg, sn->key, sn->child))
+ if (!(sn->v) && !_thin_pool_add_message(seg, sn->key, sn->child, lv_hash))
static int _thin_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _thin_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
const char *lv_name;
struct logical_volume *pool_lv, *origin = NULL, *external_lv = NULL, *merge_lv = NULL;
{
const char *lv_name;
struct logical_volume *pool_lv, *origin = NULL, *external_lv = NULL, *merge_lv = NULL;
if (!dm_config_get_str(sn, "thin_pool", &lv_name))
return SEG_LOG_ERROR("Thin pool must be a string in");
if (!dm_config_get_str(sn, "thin_pool", &lv_name))
return SEG_LOG_ERROR("Thin pool must be a string in");
- if (!(pool_lv = find_lv(seg->lv->vg, lv_name)))
+ if (!(pool_lv = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown thin pool %s in", lv_name);
if (!dm_config_get_uint64(sn, "transaction_id", &seg->transaction_id))
return SEG_LOG_ERROR("Unknown thin pool %s in", lv_name);
if (!dm_config_get_uint64(sn, "transaction_id", &seg->transaction_id))
if (!dm_config_get_str(sn, "origin", &lv_name))
return SEG_LOG_ERROR("Origin must be a string in");
if (!dm_config_get_str(sn, "origin", &lv_name))
return SEG_LOG_ERROR("Origin must be a string in");
- if (!(origin = find_lv(seg->lv->vg, lv_name)))
+ if (!(origin = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown origin %s in", lv_name);
}
if (dm_config_has_node(sn, "merge")) {
if (!dm_config_get_str(sn, "merge", &lv_name))
return SEG_LOG_ERROR("Merge lv must be a string in");
return SEG_LOG_ERROR("Unknown origin %s in", lv_name);
}
if (dm_config_has_node(sn, "merge")) {
if (!dm_config_get_str(sn, "merge", &lv_name))
return SEG_LOG_ERROR("Merge lv must be a string in");
- if (!(merge_lv = find_lv(seg->lv->vg, lv_name)))
+ if (!(merge_lv = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown merge lv %s in", lv_name);
}
return SEG_LOG_ERROR("Unknown merge lv %s in", lv_name);
}
if (!dm_config_get_str(sn, "external_origin", &lv_name))
return SEG_LOG_ERROR("External origin must be a string in");
if (!dm_config_get_str(sn, "external_origin", &lv_name))
return SEG_LOG_ERROR("External origin must be a string in");
- if (!(external_lv = find_lv(seg->lv->vg, lv_name)))
+ if (!(external_lv = dm_hash_lookup(lv_hash, lv_name)))
return SEG_LOG_ERROR("Unknown external origin %s in", lv_name);
}
return SEG_LOG_ERROR("Unknown external origin %s in", lv_name);
}
#include "lib/config/config.h"
static int _unknown_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
#include "lib/config/config.h"
static int _unknown_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ struct dm_hash_table *lv_hash)
{
struct dm_config_node *new, *last = NULL, *head = NULL;
const struct dm_config_node *current;
{
struct dm_config_node *new, *last = NULL, *head = NULL;
const struct dm_config_node *current;
static int _vdo_text_import(struct lv_segment *seg,
const struct dm_config_node *n,
static int _vdo_text_import(struct lv_segment *seg,
const struct dm_config_node *n,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
struct logical_volume *vdo_pool_lv;
const char *str;
{
struct logical_volume *vdo_pool_lv;
const char *str;
if (!dm_config_has_node(n, "vdo_pool") ||
!(str = dm_config_find_str(n, "vdo_pool", NULL)))
return _bad_field("vdo_pool");
if (!dm_config_has_node(n, "vdo_pool") ||
!(str = dm_config_find_str(n, "vdo_pool", NULL)))
return _bad_field("vdo_pool");
- if (!(vdo_pool_lv = find_lv(seg->lv->vg, str))) {
+ if (!(vdo_pool_lv = dm_hash_lookup(lv_hash, str))) {
log_error("Unknown VDO pool logical volume %s.", str);
return 0;
}
log_error("Unknown VDO pool logical volume %s.", str);
return 0;
}
static int _vdo_pool_text_import(struct lv_segment *seg,
const struct dm_config_node *n,
static int _vdo_pool_text_import(struct lv_segment *seg,
const struct dm_config_node *n,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
struct dm_vdo_target_params *vtp = &seg->vdo_params;
struct logical_volume *data_lv;
{
struct dm_vdo_target_params *vtp = &seg->vdo_params;
struct logical_volume *data_lv;
if (!dm_config_has_node(n, "data") ||
!(str = dm_config_find_str(n, "data", NULL)))
return _bad_field("data");
if (!dm_config_has_node(n, "data") ||
!(str = dm_config_find_str(n, "data", NULL)))
return _bad_field("data");
- if (!(data_lv = find_lv(seg->lv->vg, str))) {
+ if (!(data_lv = dm_hash_lookup(lv_hash, str))) {
log_error("Unknown logical volume %s.", str);
return 0;
}
log_error("Unknown logical volume %s.", str);
return 0;
}
static int _writecache_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
static int _writecache_text_import(struct lv_segment *seg,
const struct dm_config_node *sn,
- struct dm_hash_table *pv_hash __attribute__((unused)))
+ struct dm_hash_table *pv_hash __attribute__((unused)),
+ struct dm_hash_table *lv_hash)
{
struct logical_volume *origin_lv = NULL;
struct logical_volume *fast_lv;
{
struct logical_volume *origin_lv = NULL;
struct logical_volume *fast_lv;
if (!dm_config_get_str(sn, "origin", &origin_name))
return SEG_LOG_ERROR("origin must be a string in");
if (!dm_config_get_str(sn, "origin", &origin_name))
return SEG_LOG_ERROR("origin must be a string in");
- if (!(origin_lv = find_lv(seg->lv->vg, origin_name)))
+ if (!(origin_lv = dm_hash_lookup(lv_hash, origin_name)))
return SEG_LOG_ERROR("Unknown LV specified for writecache origin %s in", origin_name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
return SEG_LOG_ERROR("Unknown LV specified for writecache origin %s in", origin_name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
if (!dm_config_get_str(sn, "writecache", &fast_name))
return SEG_LOG_ERROR("writecache must be a string in");
if (!dm_config_get_str(sn, "writecache", &fast_name))
return SEG_LOG_ERROR("writecache must be a string in");
- if (!(fast_lv = find_lv(seg->lv->vg, fast_name)))
+ if (!(fast_lv = dm_hash_lookup(lv_hash, fast_name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for writecache in",
fast_name);
return SEG_LOG_ERROR("Unknown logical volume %s specified for writecache in",
fast_name);