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 4053b8e6860d02d2631173683f99b21cb108e7fc
Author: Kirill Tkhai <[email protected]>
Date:   Mon May 17 19:05:05 2021 +0300

    ploop: Fixup resize
    
    Add forgotten init_pio()
    
    Signed-off-by: Kirill Tkhai <[email protected]>
    
    =====================
    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 <[email protected]>
---
 drivers/md/dm-ploop-cmd.c | 4 ++--
 drivers/md/dm-ploop-map.c | 4 ++--
 drivers/md/dm-ploop.h     | 1 +
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index c46a5fc4a66f..063a687ecdf4 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -189,10 +189,9 @@ static int ploop_read_cluster_sync(struct ploop *ploop, 
struct pio *pio,
 {
        DECLARE_COMPLETION(completion);
 
+       init_pio(ploop, REQ_OP_READ, pio);
        pio_prepare_offsets(ploop, pio, dst_cluster);
 
-       pio->bi_status = BLK_STS_OK;
-       pio->bi_op = REQ_OP_READ;
        pio->endio_cb = wake_completion;
        pio->endio_cb_data = &completion;
 
@@ -216,6 +215,7 @@ static int ploop_write_cluster_sync(struct ploop *ploop, 
struct pio *pio,
        if (ret)
                return ret;
 
+       init_pio(ploop, REQ_OP_READ, pio);
        pio_prepare_offsets(ploop, pio, dst_cluster);
 
        pio->bi_status = BLK_STS_OK;
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 36d7b5a5643d..c08ae454e554 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -86,7 +86,7 @@ static void ploop_index_wb_init(struct ploop_index_wb *piwb, 
struct ploop *ploop
        piwb->type = PIWB_TYPE_ALLOC;
 }
 
-static void init_pio(struct ploop *ploop, unsigned int bi_op, struct pio *pio)
+void init_pio(struct ploop *ploop, unsigned int bi_op, struct pio *pio)
 {
        pio->ploop = ploop;
        pio->bi_op = bi_op;
@@ -1166,8 +1166,8 @@ static void submit_cluster_write(struct ploop_cow *cow)
                goto error;
        cow->dst_cluster = dst_cluster;
 
+       init_pio(ploop, REQ_OP_WRITE, pio);
        pio_prepare_offsets(ploop, pio, dst_cluster);
-       pio->bi_op = REQ_OP_WRITE;
 
        BUG_ON(irqs_disabled());
        read_lock_irq(&ploop->bat_rwlock);
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index e1924744757a..6343a93aa9c0 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -539,6 +539,7 @@ extern struct pio *find_lk_of_cluster(struct ploop *ploop, 
u32 cluster);
 extern void unlink_postponed_backup_endio(struct ploop *ploop,
                                          struct list_head *pio_list,
                                          struct pio *h);
+extern void init_pio(struct ploop *ploop, unsigned int bi_op, struct pio *pio);
 extern int rw_page_sync(unsigned rw, struct file *file,
                        u64 index, struct page *page);
 extern void submit_rw_mapped(struct ploop *ploop, u32 dst_clu, struct pio 
*pio);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to