[Devel] [PATCH RH8 57/61] ploop: Fixup resize
Kirill Tkhai
ktkhai at virtuozzo.com
Fri May 14 18:59:41 MSK 2021
Add forgotten init_pio()
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
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);
More information about the Devel
mailing list