[Devel] [PATCH RHEL7 COMMIT] ploop: Rename bio_discard_inflight_reqs into discard_inflight_reqs

Konstantin Khorenko khorenko at virtuozzo.com
Fri Mar 6 13:55:48 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1062.12.1.vz7.145.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.12.1.vz7.131.8
------>
commit 20b06fc288f51f2386639f01b1bbb915c63c9d60
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Mar 6 13:55:48 2020 +0300

    ploop: Rename bio_discard_inflight_reqs into discard_inflight_reqs
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    ploop: Be over protectable on discard
    
    Forcedly wait and disable discard on snapshot and grow.
    
    Kirill Tkhai (4):
          ploop: Simplify check in ploop_fast_end_io()
          ploop: Rename fast_path_waitq into pending_waitq
          ploop: Rename bio_discard_inflight_reqs into discard_inflight_reqs
          ploop: Be overprotective on discard
---
 drivers/block/ploop/dev.c   | 6 +++---
 drivers/block/ploop/sysfs.c | 2 +-
 include/linux/ploop/ploop.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 833b472201175..7836731223852 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -991,7 +991,7 @@ static void ploop_make_request(struct request_queue *q, struct bio *bio)
 	 * (PLOOP_S_TRACK was checked immediately above) */
 	if (FAST_PATH_DISABLED(plo->maintenance_type) ||
 	    plo->fast_path_disabled_count ||
-	    plo->bio_discard_inflight_reqs)
+	    plo->discard_inflight_reqs)
 		goto queue;
 
 	/* Attention state, always queue */
@@ -1381,7 +1381,7 @@ static void ploop_complete_request(struct ploop_request * preq)
 	spin_lock_irq(&plo->lock);
 	plo->active_reqs--;
 	if (preq->req_rw & REQ_DISCARD)
-		plo->bio_discard_inflight_reqs--;
+		plo->discard_inflight_reqs--;
 	spin_unlock_irq(&plo->lock);
 
 	while (preq->bl.head) {
@@ -3165,7 +3165,7 @@ static int ploop_thread(void * data)
 
 			plo->active_reqs++;
 			if ((preq->req_rw & REQ_DISCARD) &&
-			    (plo->bio_discard_inflight_reqs++) == 0)
+			    (plo->discard_inflight_reqs++) == 0)
 				wait_fast_path = true;
 			ploop_entry_qlen_dec(preq);
 
diff --git a/drivers/block/ploop/sysfs.c b/drivers/block/ploop/sysfs.c
index 292ed3c48990e..3fadf404311b2 100644
--- a/drivers/block/ploop/sysfs.c
+++ b/drivers/block/ploop/sysfs.c
@@ -298,7 +298,7 @@ static u32 show_discard_bios(struct ploop_device * plo)
 
 static u32 show_discard_inflight_bios(struct ploop_device * plo)
 {
-	return plo->bio_discard_inflight_reqs;
+	return plo->discard_inflight_reqs;
 }
 
 static u32 show_active_reqs(struct ploop_device * plo)
diff --git a/include/linux/ploop/ploop.h b/include/linux/ploop/ploop.h
index 0b86879443629..688de1185d2b7 100644
--- a/include/linux/ploop/ploop.h
+++ b/include/linux/ploop/ploop.h
@@ -381,7 +381,7 @@ struct ploop_device
 	struct bio		*bio_sync;
 	struct bio_list		bio_discard_list;
 	int			bio_discard_qlen;
-	int			bio_discard_inflight_reqs;
+	int			discard_inflight_reqs;
 	int			bio_qlen;
 	int			bio_total;
 


More information about the Devel mailing list