main - vdo: read new sysfs path
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e6f735d411e5911de186a610932c9bb9638275eb Commit: e6f735d411e5911de186a610932c9bb9638275eb Parent: 89595a366554191c3df1a18e1f82b79c450a21ad Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Sep 9 14:59:38 2021 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Sep 9 15:24:15 2021 +0200
vdo: read new sysfs path
New versions of kvdo module exposes statistics at new location:/sys/block/dm-XXX/vdo/statistics/...
Enhance lvm2 to access this location first.
Also if the statistic info is missing - make it 'debug' level info, so it is not failing 'lvs' command.
--- WHATS_NEW | 1 + lib/activate/dev_manager.c | 7 +++--- lib/metadata/metadata-exported.h | 3 ++- lib/metadata/vdo_manip.c | 46 ++++++++++++++++++++++------------------ 4 files changed, 32 insertions(+), 25 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.03.14 - ================================== + Support newer location for VDO statistics. Add support for VDO async-unsage write policy. Improve lvm_import_vdo script. Support VDO LV with lvcreate -ky.
lib/activate/dev_manager.c +4 -3
@@ -157,6 +157,7 @@ out:static int _get_segment_status_from_target_params (const char *target_name,const char *params, +const struct dm_info *dminfo,struct lv_seg_status *seg_status) {const struct lv_segment *seg = seg_status->seg;
@@ -216,7 +217,7 @@ static int _get_segment_status_from_target_params(const char *target_name, return_0; seg_status->type =SEG_STATUS_SNAPSHOT ; }else if (segtype_is_vdo_pool (segtype)) { -if (!parse_vdo_pool_status (seg_status->mem, seg->lv, params, &seg_status->vdo_pool)) +if (!parse_vdo_pool_status (seg_status->mem, seg->lv, params, dminfo, &seg_status->vdo_pool)) return_0; seg_status->type =SEG_STATUS_VDO_POOL ; }else if (segtype_is_writecache (segtype)) {
@@ -320,7 +321,7 @@ static int _info_run(const char *dlid, struct dm_info *dminfo, }while (target);if (!target_name || - !_get_segment_status_from_target_params (target_name, target_params, seg_status)) + !_get_segment_status_from_target_params (target_name, target_params, dminfo, seg_status)) stack; }
@@ -1886,7 +1887,7 @@ int dev_manager_vdo_pool_status(struct dev_manager *dm, goto out; } -if (!parse_vdo_pool_status (dm->mem, lv, params, *status)) +if (!parse_vdo_pool_status (dm->mem, lv, params, &info, *status)) goto_out; (*status)->mem = dm->mem;
lib/metadata/metadata-exported.h +2 -1
@@ -1365,7 +1365,8 @@ const char *get_vdo_write_policy_name(enum dm_vdo_write_policy policy);uint64_t get_vdo_pool_virtual_size (const struct lv_segment *vdo_pool_seg);int update_vdo_pool_virtual_size (struct lv_segment *vdo_pool_seg);int parse_vdo_pool_status (struct dm_pool *mem,const struct logical_volume *vdo_pool_lv, -const char *params,struct lv_status_vdo *status); +const char *params,const struct dm_info *dminfo, +struct lv_status_vdo *status); struct logical_volume *convert_vdo_pool_lv(struct logical_volume *data_lv, const struct dm_vdo_target_params *vtp, uint32_t *virtual_extents,
lib/metadata/vdo_manip.c +25 -21
88 lines not on this page · raw message