master - report: add kernel_cache_settings field
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1ee6af344bd805d4fa847b95b326c2fe1e52d7cd Commit: 1ee6af344bd805d4fa847b95b326c2fe1e52d7cd Parent: 7f627770412c7edd08aa5e5376fad58bca0b6c36 Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Jan 18 14:32:17 2016 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Jan 18 14:42:29 2016 +0100
report: add kernel_cache_settings field
Existing cache_settings field displays the settings which are saved in metadata. Add new kernel_cache_settings fields to display the settings which are currently used by kernel, including fields for which default values are used.
This way users have complete view of the set of cache settings supported (and which they can set) and their values which are used at the moment by kernel.
For example:
$ lvs -o name,cache_policy,cache_settings,kernel_cache_settings vg LV Cache Policy Cache Settings KCache Settings cached1 mq migration_threshold=1024,write_promote_adjustment=2 migration_threshold=1024,random_threshold=4,sequential_threshold=512,discard_promote_adjustment=1,read_promote_adjustment=4,write_promote_adjustment=2 cached2 smq migration_threshold=1024 migration_threshold=1024 cached3 smq migration_threshold=2048 --- WHATS_NEW | 1 + lib/report/columns.h | 1 + lib/report/properties.c | 2 + lib/report/report.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.141 - ==================================== + Add kernel_cache_settings report field for cache LV settings used in kernel. Version 2.02.140 - 16th January 2016 ====================================
lib/report/columns.h +1 -0
@@ -112,6 +112,7 @@ FIELD(LVSSTATUS, lv, NUM, "CacheReadHits", lvid, 16, cache_read_hits, cache_read FIELD(LVSSTATUS, lv, NUM, "CacheReadMisses", lvid, 16, cache_read_misses, cache_read_misses, "Cache read misses.", 0) FIELD(LVSSTATUS, lv, NUM, "CacheWriteHits", lvid, 16, cache_write_hits, cache_write_hits, "Cache write hits.", 0) FIELD(LVSSTATUS, lv, NUM, "CacheWriteMisses", lvid, 16, cache_write_misses, cache_write_misses, "Cache write misses.", 0) +FIELD(LVSSTATUS, lv, STR_LIST, "KCache Settings", lvid, 18, kernel_cache_settings, kernel_cache_settings, "Cache settings/parameters as set in kernel, including default values (cached segments only).", 0) FIELD(LVSSTATUS, lv, STR, "Health", lvid, 15, lvhealthstatus, lv_health_status, "LV health status.", 0)FIELD (LVSSTATUS , lv,STR ,"KDiscards" , lvid,8 , kdiscards, kernel_discards,"For thin pools, how discards are handled in kernel." ,0 )
lib/report/properties.c +2 -0
@@ -481,6 +481,8 @@ GET_LVSEG_STR_PROPERTY_FN(seg_monitor, lvseg_monitor_dup(lvseg->lv->vg->vgmem, l#define _cache_policy_set prop_not_implemented_set#define _cache_settings_get prop_not_implemented_get#define _cache_settings_set prop_not_implemented_set +#define _kernel_cache_settings_get prop_not_implemented_get +#define _kernel_cache_settings_set prop_not_implemented_set/* PVSEG */ GET_PVSEG_NUM_PROPERTY_FN (pvseg_start, pvseg->pe)
lib/report/report.c +68 -0
74 lines not on this page · raw message