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:
parent
1e97d2dd28
commit
e5d3f81285
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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");
|
||||
@ -216,7 +216,6 @@ static int _cache_text_import(struct lv_segment *seg,
|
||||
if (!(origin_lv = find_lv(seg->lv->vg, 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_0;
|
||||
|
||||
|
@ -342,6 +342,7 @@ 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;
|
||||
|
||||
|
@ -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.",
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user