mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cache: prepare status checking for layer
To be ready to show status of cache volume, call the status with layer. Layer is automatically detected in this case when cache volume is used in 'layered' form (needs -real suffix).
This commit is contained in:
parent
bf157ed833
commit
a24eae6e82
@ -1,5 +1,6 @@
|
||||
Version 2.02.169 -
|
||||
=====================================
|
||||
Support status checking of cache volume used in layer.
|
||||
Avoid shifting by one number of blocks when clearing dirty cache volume.
|
||||
Extend metadata validation of external origin LV use count.
|
||||
Fix dm table when the last user of active external origin is removed.
|
||||
|
@ -770,7 +770,7 @@ int lv_info_with_seg_status(struct cmd_context *cmd,
|
||||
/* INFO is not set as cache-pool cannot be active.
|
||||
* STATUS is collected from cache LV */
|
||||
lv_seg = get_only_segment_using_this_lv(lv);
|
||||
(void) _lv_info(cmd, lv_seg->lv, 0, NULL, lv_seg, &status->seg_status, 0, 0);
|
||||
(void) _lv_info(cmd, lv_seg->lv, 1, NULL, lv_seg, &status->seg_status, 0, 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1171,7 +1171,7 @@ int lv_cache_status(const struct logical_volume *cache_lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!lv_info(cache_lv->vg->cmd, cache_lv, 0, NULL, 0, 0)) {
|
||||
if (!lv_info(cache_lv->vg->cmd, cache_lv, 1, NULL, 0, 0)) {
|
||||
log_error("Cannot check status for locally inactive cache volume %s.",
|
||||
display_lvname(cache_lv));
|
||||
return 0;
|
||||
|
@ -475,7 +475,7 @@ int lv_cache_remove(struct logical_volume *cache_lv)
|
||||
}
|
||||
|
||||
/* Localy active volume is needed for writeback */
|
||||
if (!lv_is_active_locally(cache_lv)) {
|
||||
if (!lv_info(cache_lv->vg->cmd, cache_lv, 1, NULL, 0, 0)) {
|
||||
/* Give up any remote locks */
|
||||
if (!deactivate_lv(cache_lv->vg->cmd, cache_lv)) {
|
||||
log_error("Cannot deactivate remotely active cache volume %s.",
|
||||
|
Loading…
Reference in New Issue
Block a user