diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-12 13:07:05 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-03-14 16:34:38 +0100 |
commit | 3608e8aee74a5c771b96d768e6c32edc728dbca0 (patch) | |
tree | 948c45f9c2d8c3a73e99e3c4e4c0390eb4ba6c00 /lib/metadata/cache_manip.c | |
parent | a3bb8f2ec195fcfbea599d6efa784cb5cbd39741 (diff) | |
download | lvm2-3608e8aee74a5c771b96d768e6c32edc728dbca0.tar.gz |
cache: use interruptible_usleep
Reuse code for interruptible sleeping.
Diffstat (limited to 'lib/metadata/cache_manip.c')
-rw-r--r-- | lib/metadata/cache_manip.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c index 3eac736dd..98821430f 100644 --- a/lib/metadata/cache_manip.c +++ b/lib/metadata/cache_manip.c @@ -470,13 +470,7 @@ int lv_cache_wait_for_clean(struct logical_volume *cache_lv, int *is_clean) //FIXME: use polling to do this... for (;;) { - sigint_allow(); - if (cleaner_policy) - /* TODO: Use centralized place */ - usleep(500000); - sigint_restore(); - if (sigint_caught()) { - sigint_clear(); + if (cleaner_policy && interruptible_usleep(500000)) { log_error("Flushing of %s aborted.", display_lvname(cache_lv)); if (cache_seg->cleaner_policy) { cache_seg->cleaner_policy = 0; |