[Devel] [PATCH RHEL8 COMMIT] push_backup: Use nr_delayed in postpone_if_required_for_backup()

Konstantin Khorenko khorenko at virtuozzo.com
Fri Sep 10 20:16:45 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-305.3.1.vz8.7.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-305.3.1.vz8.7.11
------>
commit 36f57d4713f2e306b6612daaaa5e525227252b93
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Sep 10 20:16:45 2021 +0300

    push_backup: Use nr_delayed in postpone_if_required_for_backup()
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    ====================
    push_backup: Make target !immutable.
    
    https://jira.sw.ru/browse/PSBM-127989
    
    Kirill Tkhai (14):
          push_backup: Rename ppb_map
          push_backup: Add unsigned long alignment
          push_backup: Add pending_map
          push_backup: Kill find_node_pbio_range()
          push_backup: Use nr_delayed in postpone_if_required_for_backup()
          push_backup: Introduce hash table
          push_backup: Leave pending pbio in pending queue
          push_backup: Do not split bios by cluster size
          dm: Allow singleton target with devices attached
          dm: Introduce dm_requeue_original_rq()
          push_backup: Make it request based
          push_backup: Change retval postpone_if_required_for_backup()
          push_backup: Change arguments of calc_bio_clusters()
          push_backup: Make the target !immutable
---
 drivers/md/dm-push-backup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index 739f1a8a5e6a..90562178f9a6 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -234,7 +234,7 @@ static bool postpone_if_required_for_backup(struct push_backup *pb,
 		goto unlock;
 	}
 
-	if (RB_EMPTY_ROOT(&pb->rb_root)) {
+	if (pb->nr_delayed == 1) { /* We are the first */
 		pb->deadline_jiffies = get_jiffies_64() + pb->timeout_in_jiffies;
 		queue_timer = true;
 	}


More information about the Devel mailing list