diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2020-09-27 01:11:47 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2020-09-29 10:43:56 +0200 |
commit | 4de6f58085c533c79ce2e0db6cdeb6ed06fe05f8 (patch) | |
tree | fd3880637513515a6b14af693715a257f6b64fdc /lib/activate/activate.h | |
parent | 92c0e8c17f506b551c1b7c0a448d60279e7fdae6 (diff) | |
download | lvm2-4de6f58085c533c79ce2e0db6cdeb6ed06fe05f8.tar.gz |
thin: use lv_status_thin and lv_status_thin_pool
Introduce structures lv_status_thin_pool and
lv_status_thin (pair to lv_status_cache, lv_status_vdo)
Convert lv_thin_percent() -> lv_thin_status()
and lv_thin_pool_percent() + lv_thin_pool_transaction_id() ->
lv_thin_pool_status().
This way a function user can see not only percentages, but also
other important status info about thin-pool.
TODO:
This patch tries to not change too many other things,
but pool_below_threshold() now uses new thin-pool info to return
failure if thin-pool cannot be actually modified.
This should be handle separately in a better way.
Diffstat (limited to 'lib/activate/activate.h')
-rw-r--r-- | lib/activate/activate.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/activate/activate.h b/lib/activate/activate.h index e3c1bb35e..3f4d128be 100644 --- a/lib/activate/activate.h +++ b/lib/activate/activate.h @@ -191,13 +191,11 @@ int lv_raid_message(const struct logical_volume *lv, const char *msg); int lv_writecache_message(const struct logical_volume *lv, const char *msg); int lv_cache_status(const struct logical_volume *cache_lv, struct lv_status_cache **status); -int lv_thin_pool_percent(const struct logical_volume *lv, int metadata, - dm_percent_t *percent); -int lv_thin_percent(const struct logical_volume *lv, int mapped, - dm_percent_t *percent); -int lv_thin_pool_transaction_id(const struct logical_volume *lv, - uint64_t *transaction_id); int lv_thin_device_id(const struct logical_volume *lv, uint32_t *device_id); +int lv_thin_status(const struct logical_volume *lv, int flush, + struct lv_status_thin **status); +int lv_thin_pool_status(const struct logical_volume *lv, int flush, + struct lv_status_thin_pool **status); int lv_vdo_pool_status(const struct logical_volume *lv, int flush, struct lv_status_vdo **status); int lv_vdo_pool_percent(const struct logical_volume *lv, dm_percent_t *percent); |