mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
cache: use interruptible_usleep
Reuse code for interruptible sleeping.
This commit is contained in:
parent
a3bb8f2ec1
commit
3608e8aee7
@ -470,13 +470,7 @@ int lv_cache_wait_for_clean(struct logical_volume *cache_lv, int *is_clean)
|
|||||||
|
|
||||||
//FIXME: use polling to do this...
|
//FIXME: use polling to do this...
|
||||||
for (;;) {
|
for (;;) {
|
||||||
sigint_allow();
|
if (cleaner_policy && interruptible_usleep(500000)) {
|
||||||
if (cleaner_policy)
|
|
||||||
/* TODO: Use centralized place */
|
|
||||||
usleep(500000);
|
|
||||||
sigint_restore();
|
|
||||||
if (sigint_caught()) {
|
|
||||||
sigint_clear();
|
|
||||||
log_error("Flushing of %s aborted.", display_lvname(cache_lv));
|
log_error("Flushing of %s aborted.", display_lvname(cache_lv));
|
||||||
if (cache_seg->cleaner_policy) {
|
if (cache_seg->cleaner_policy) {
|
||||||
cache_seg->cleaner_policy = 0;
|
cache_seg->cleaner_policy = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user