[Devel] [PATCH RH8 31/61] ploop: Convert call_rw_iter()
Kirill Tkhai
ktkhai at virtuozzo.com
Fri May 14 18:57:22 MSK 2021
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 3 +--
drivers/md/dm-ploop-target.c | 3 +--
drivers/md/dm-ploop.h | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index b62eb055160d..d98d1cdd1f9e 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1290,7 +1290,6 @@ static void data_rw_complete(struct pio *pio)
static void submit_rw_mapped(struct ploop *ploop, loff_t clu_pos, struct pio *pio)
{
- struct bio *bio = dm_bio_from_per_bio_data(pio, sizeof(*pio));
unsigned int rw, nr_segs;
struct bio_vec *bvec;
struct iov_iter iter;
@@ -1308,7 +1307,7 @@ static void submit_rw_mapped(struct ploop *ploop, loff_t clu_pos, struct pio *pi
remap_to_cluster(ploop, pio, clu_pos);
pos = to_bytes(pio->bi_iter.bi_sector);
- call_rw_iter(top_delta(ploop)->file, pos, rw, &iter, bio);
+ call_rw_iter(top_delta(ploop)->file, pos, rw, &iter, pio);
}
static int process_one_deferred_bio(struct ploop *ploop, struct pio *pio,
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index f2bf9b06dc9b..14bd37610b25 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -41,9 +41,8 @@ static void ploop_aio_complete(struct kiocb *iocb, long ret, long ret2)
}
void call_rw_iter(struct file *file, loff_t pos, unsigned rw,
- struct iov_iter *iter, struct bio *bio)
+ struct iov_iter *iter, struct pio *pio)
{
- struct pio *pio = bio_to_endio_hook(bio);
struct kiocb *iocb = &pio->iocb;
int ret;
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index a692b49f7ae6..581ebc999c8b 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -556,5 +556,5 @@ extern int ploop_setup_metadata(struct ploop *ploop, struct page *page);
extern int ploop_read_delta_metadata(struct ploop *ploop, struct file *file,
void **d_hdr);
extern void call_rw_iter(struct file *file, loff_t pos, unsigned rw,
- struct iov_iter *iter, struct bio *bio);
+ struct iov_iter *iter, struct pio *pio);
#endif /* __DM_PLOOP_H */
More information about the Devel
mailing list