[Devel] [PATCH RHEL8 COMMIT] ploop: Rename bi_opf into bi_op

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 17 19:05:03 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.30
------>
commit 588736366000c92575c7d6c478acf3f0aa09ef85
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 17 19:05:03 2021 +0300

    ploop: Rename bi_opf into bi_op
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    dm-ploop: Kill loop
    
    Intermediate patches can't be base for bisect.
    
    In scope of https://jira.sw.ru/browse/PSBM-123654
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c |  4 ++--
 drivers/md/dm-ploop-map.c | 20 ++++++++++----------
 drivers/md/dm-ploop.h     |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index 594cf8a4c1bb..c46a5fc4a66f 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -192,7 +192,7 @@ static int ploop_read_cluster_sync(struct ploop *ploop, struct pio *pio,
 	pio_prepare_offsets(ploop, pio, dst_cluster);
 
 	pio->bi_status = BLK_STS_OK;
-	pio->bi_opf = REQ_OP_READ;
+	pio->bi_op = REQ_OP_READ;
 	pio->endio_cb = wake_completion;
 	pio->endio_cb_data = &completion;
 
@@ -219,7 +219,7 @@ static int ploop_write_cluster_sync(struct ploop *ploop, struct pio *pio,
 	pio_prepare_offsets(ploop, pio, dst_cluster);
 
 	pio->bi_status = BLK_STS_OK;
-	pio->bi_opf = REQ_OP_WRITE;
+	pio->bi_op = REQ_OP_WRITE;
 	pio->endio_cb = wake_completion;
 	pio->endio_cb_data = &completion;
 
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 72df8e64140a..967122e050f1 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -89,7 +89,7 @@ static void ploop_index_wb_init(struct ploop_index_wb *piwb, struct ploop *ploop
 static void init_pio(struct ploop *ploop, unsigned int bi_op, struct pio *pio)
 {
 	pio->ploop = ploop;
-	pio->bi_opf = bi_op;
+	pio->bi_op = bi_op;
 	pio->action = PLOOP_END_IO_NONE;
 	pio->ref_index = PLOOP_REF_INDEX_INVALID;
 	pio->bi_status = BLK_STS_OK;
@@ -194,7 +194,7 @@ void __track_pio(struct ploop *ploop, struct pio *pio)
 {
 	unsigned int dst_cluster = pio->bi_iter.bi_sector >> ploop->cluster_log;
 
-	if (!op_is_write(pio->bi_opf) || !bvec_iter_sectors((pio)->bi_iter))
+	if (!op_is_write(pio->bi_op) || !bvec_iter_sectors((pio)->bi_iter))
 		return;
 
 	track_dst_cluster(ploop, dst_cluster);
@@ -951,7 +951,7 @@ void submit_rw_mapped(struct ploop *ploop, u32 dst_clu, struct pio *pio)
 
 	pio->complete = data_rw_complete;
 
-	rw = (op_is_write(pio->bi_opf) ? WRITE : READ);
+	rw = (op_is_write(pio->bi_op) ? WRITE : READ);
 	nr_segs = pio_nr_segs(pio);
 	bvec = __bvec_iter_bvec(pio->bi_io_vec, pio->bi_iter);
 
@@ -1069,7 +1069,7 @@ static bool postpone_if_required_for_backup(struct ploop *ploop,
 
 	if (likely(!pb || !pb->alive))
 		return false;
-	if (!op_is_write(pio->bi_opf))
+	if (!op_is_write(pio->bi_op))
 		return false;
 	if (!test_bit(cluster, pb->ppb_map))
 		return false;
@@ -1129,7 +1129,7 @@ int submit_cluster_cow(struct ploop *ploop, unsigned int level,
 	cow->data = data;
 
 	pio_prepare_offsets(ploop, pio, cluster);
-	pio->bi_opf = REQ_OP_READ;
+	pio->bi_op = REQ_OP_READ;
 	pio->endio_cb = ploop_cow_endio;
 	pio->endio_cb_data = cow;
 
@@ -1180,7 +1180,7 @@ static void submit_cluster_write(struct ploop_cow *cow)
 	cow->dst_cluster = dst_cluster;
 
 	pio_prepare_offsets(ploop, pio, dst_cluster);
-	pio->bi_opf = REQ_OP_WRITE;
+	pio->bi_op = REQ_OP_WRITE;
 
 	BUG_ON(irqs_disabled());
 	read_lock_irq(&ploop->bat_rwlock);
@@ -1363,7 +1363,7 @@ static int process_one_deferred_bio(struct ploop *ploop, struct pio *pio,
 	if (postpone_if_required_for_backup(ploop, pio, cluster))
 		goto out;
 
-	if (op_is_discard(pio->bi_opf)) {
+	if (op_is_discard(pio->bi_op)) {
 		handle_discard_pio(ploop, pio, cluster, dst_cluster);
 		goto out;
 	}
@@ -1371,7 +1371,7 @@ static int process_one_deferred_bio(struct ploop *ploop, struct pio *pio,
 	if (cluster_is_in_top_delta(ploop, cluster)) {
 		/* Already mapped */
 		goto queue;
-	} else if (!op_is_write(pio->bi_opf)) {
+	} else if (!op_is_write(pio->bi_op)) {
 		/*
 		 * Simple read from secondary delta. May fail.
 		 * (Also handles the case dst_cluster == BAT_ENTRY_NONE).
@@ -1690,7 +1690,7 @@ static noinline void submit_pio(struct ploop *ploop, struct pio *pio)
 	if (pio->bi_iter.bi_size) {
 		if (ploop_pio_cluster(ploop, pio, &cluster) < 0)
 			goto kill;
-		if (op_is_discard(pio->bi_opf) &&
+		if (op_is_discard(pio->bi_op) &&
 		    endio_if_unsupported_discard(ploop, pio))
 			goto out;
 
@@ -1698,7 +1698,7 @@ static noinline void submit_pio(struct ploop *ploop, struct pio *pio)
 		goto out;
 	}
 
-	if (WARN_ON_ONCE(pio->bi_opf != REQ_OP_FLUSH))
+	if (WARN_ON_ONCE(pio->bi_op != REQ_OP_FLUSH))
 		goto kill;
 
 	spin_lock_irqsave(&ploop->deferred_lock, flags);
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index 3e562710194b..7579af22a43e 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -247,7 +247,7 @@ struct pio {
 
 	struct bvec_iter	bi_iter;
 	struct bio_vec		*bi_io_vec;
-	unsigned int		bi_opf;
+	unsigned int		bi_op;
 	unsigned int		bi_vcnt;
 	blk_status_t bi_status;
 


More information about the Devel mailing list