1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: indents comments backtraces

This commit is contained in:
Zdenek Kabelac 2014-11-06 20:36:53 +01:00
parent 1e97d2dd28
commit e5d3f81285
7 changed files with 13 additions and 11 deletions

View File

@ -1687,7 +1687,8 @@ static int _preload_detached_lv(struct logical_volume *lv, void *data)
struct lv_list *lvl_pre;
if ((lvl_pre = find_lv_in_vg(detached->lv_pre->vg, lv->name))) {
if (lv_is_visible(lvl_pre->lv) && lv_is_active(lv) && (!lv_is_cow(lv) || !lv_is_cow(lvl_pre->lv)) &&
if (lv_is_visible(lvl_pre->lv) && lv_is_active(lv) &&
(!lv_is_cow(lv) || !lv_is_cow(lvl_pre->lv)) &&
!_lv_preload(lvl_pre->lv, detached->laopts, detached->flush_required))
return_0;
}

View File

@ -1207,7 +1207,7 @@ int dev_manager_cache_status(struct dev_manager *dm,
goto_out;
c = (*status)->cache;
(*status)->mem = dm->mem; /* User can destroy this mem pool later */
(*status)->mem = dm->mem; /* User has to destroy this mem pool later */
(*status)->data_usage = dm_make_percent(c->used_blocks,
c->total_blocks);
(*status)->metadata_usage = dm_make_percent(c->metadata_used_blocks,

View File

@ -45,7 +45,7 @@ static int _cache_pool_text_import(struct lv_segment *seg,
return SEG_LOG_ERROR("Cache data must be a string in");
if (!(data_lv = find_lv(seg->lv->vg, str)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache data in", str);
"cache data in", str);
if (!dm_config_has_node(sn, "metadata"))
return SEG_LOG_ERROR("Cache metadata not specified in");
@ -53,7 +53,7 @@ static int _cache_pool_text_import(struct lv_segment *seg,
return SEG_LOG_ERROR("Cache metadata must be a string in");
if (!(meta_lv = find_lv(seg->lv->vg, str)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache metadata in", str);
"cache metadata in", str);
if (!dm_config_get_uint32(sn, "chunk_size", &seg->chunk_size))
return SEG_LOG_ERROR("Couldn't read cache chunk_size in");
@ -199,7 +199,7 @@ static int _cache_text_import(struct lv_segment *seg,
struct dm_hash_table *pv_hash __attribute__((unused)))
{
struct logical_volume *pool_lv, *origin_lv;
const char *name = NULL;
const char *name;
if (!dm_config_has_node(sn, "cache_pool"))
return SEG_LOG_ERROR("cache_pool not specified in");
@ -207,7 +207,7 @@ static int _cache_text_import(struct lv_segment *seg,
return SEG_LOG_ERROR("cache_pool must be a string in");
if (!(pool_lv = find_lv(seg->lv->vg, name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache_pool in", name);
"cache_pool in", name);
if (!dm_config_has_node(sn, "origin"))
return SEG_LOG_ERROR("Cache origin not specified in");
@ -215,8 +215,7 @@ static int _cache_text_import(struct lv_segment *seg,
return SEG_LOG_ERROR("Cache origin must be a string in");
if (!(origin_lv = find_lv(seg->lv->vg, name)))
return SEG_LOG_ERROR("Unknown logical volume %s specified for "
"cache origin in", name);
"cache origin in", name);
if (!set_lv_segment_area_lv(seg, 0, origin_lv, 0, 0))
return_0;

View File

@ -342,8 +342,9 @@ int lv_cache_remove(struct logical_volume *cache_lv)
*/
corigin_lv = seg_lv(cache_seg, 0);
lv_set_visible(corigin_lv);
if (!remove_layer_from_lv(cache_lv, corigin_lv))
return_0;
return_0;
/* Replace 'error' with 'cache' segtype */
cache_seg = first_seg(corigin_lv);

View File

@ -7018,6 +7018,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
if (seg_is_cache(lp)) {
/* TODO: support remote exclusive activation? */
/* Not yet 'cache' LV, it is stripe volume for wiping */
if (is_change_activating(lp->activate) &&
!activate_lv_excl_local(cmd, lv)) {
log_error("Aborting. Failed to activate LV %s locally exclusively.",

View File

@ -170,7 +170,7 @@ void *dm_pool_alloc_aligned(struct dm_pool *p, size_t s, unsigned alignment)
struct block *b = _new_block(s, alignment);
if (!b)
return NULL;
return_NULL;
_append_block(p, b);

View File

@ -107,7 +107,7 @@ void *dm_pool_alloc_aligned(struct dm_pool *p, size_t s, unsigned alignment)
needed : p->chunk_size);
if (!c)
return NULL;
return_NULL;
_align_chunk(c, alignment);
}