master - cleanup: indents comments backtraces
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e5d3f812854b23ef5e7e51f96a3f89fa02c093fa Commit: e5d3f812854b23ef5e7e51f96a3f89fa02c093fa Parent: 1e97d2dd286a184fc1d26a9abb60fea9e2b7d44d Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Nov 6 20:36:53 2014 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Nov 10 22:05:49 2014 +0100
cleanup: indents comments backtraces
--- lib/activate/activate.c | 3 ++- lib/activate/dev_manager.c | 2 +- lib/cache_segtype/cache.c | 11 +++++------ lib/metadata/cache_manip.c | 3 ++- lib/metadata/lv_manip.c | 1 + libdm/mm/pool-debug.c | 2 +- libdm/mm/pool-fast.c | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-)
lib/activate/activate.c +2 -1
@@ -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; }
lib/activate/dev_manager.c +1 -1
@@ -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,
lib/cache_segtype/cache.c +5 -6
@@ -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;
lib/metadata/cache_manip.c +2 -1
@@ -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);
lib/metadata/lv_manip.c +1 -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.",
libdm/mm/pool-debug.c +1 -1
@@ -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);
libdm/mm/pool-fast.c +1 -1
@@ -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); }