[Devel] [PATCH RH8 1/3] ploop: Rename call_rw_iter
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Jun 9 18:38:27 MSK 2021
Add "ploop_" prefix.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-bat.c | 2 +-
drivers/md/dm-ploop-map.c | 6 +++---
drivers/md/dm-ploop-target.c | 12 ++++++------
drivers/md/dm-ploop.h | 10 +++++-----
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index 126646bfeb09..7a04544d5d0a 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -83,7 +83,7 @@ static struct md_page * alloc_md_page(unsigned int id)
return NULL;
}
-void free_md_page(struct md_page *md)
+void ploop_free_md_page(struct md_page *md)
{
put_page(md->page);
kfree(md->bat_levels);
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index c7e6de166cb3..ebcdfb875b10 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1098,7 +1098,7 @@ void submit_rw_mapped(struct ploop *ploop, u32 dst_clu, struct pio *pio)
remap_to_cluster(ploop, pio, dst_clu);
pos = to_bytes(pio->bi_iter.bi_sector);
- call_rw_iter(top_delta(ploop)->file, pos, rw, &iter, pio);
+ ploop_call_rw_iter(top_delta(ploop)->file, pos, rw, &iter, pio);
}
/*
@@ -1549,8 +1549,8 @@ void ploop_submit_index_wb_sync(struct ploop *ploop,
/* track_bio() will be called in ploop_bat_write_complete() */
- ret = rw_page_sync(WRITE, top_delta(ploop)->file,
- piwb->page_nr, piwb->bat_page);
+ ret = ploop_rw_page_sync(WRITE, top_delta(ploop)->file,
+ piwb->page_nr, piwb->bat_page);
if (ret)
status = errno_to_blk_status(ret);
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index ec0a940ebb14..2cfcdda34160 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -40,8 +40,8 @@ static void ploop_aio_complete(struct kiocb *iocb, long ret, long ret2)
ploop_aio_do_completion(pio);
}
-void call_rw_iter(struct file *file, loff_t pos, unsigned rw,
- struct iov_iter *iter, struct pio *pio)
+void ploop_call_rw_iter(struct file *file, loff_t pos, unsigned rw,
+ struct iov_iter *iter, struct pio *pio)
{
struct kiocb *iocb = &pio->iocb;
int ret;
@@ -65,8 +65,8 @@ void call_rw_iter(struct file *file, loff_t pos, unsigned rw,
iocb->ki_complete(iocb, ret, 0);
}
-int rw_page_sync(unsigned rw, struct file *file,
- u64 index, struct page *page)
+int ploop_rw_page_sync(unsigned rw, struct file *file,
+ u64 index, struct page *page)
{
struct bio_vec *bvec, bvec_on_stack;
struct iov_iter iter;
@@ -118,7 +118,7 @@ void free_md_pages_tree(struct rb_root *root)
while ((node = root->rb_node) != NULL) {
md = rb_entry(node, struct md_page, node);
rb_erase(node, root);
- free_md_page(md);
+ ploop_free_md_page(md);
}
}
@@ -202,7 +202,7 @@ static int check_top_delta(struct ploop *ploop, struct file *file)
if (!page)
goto out;
- ret = rw_page_sync(READ, file, 0, page);
+ ret = ploop_rw_page_sync(READ, file, 0, page);
if (ret < 0)
goto out;
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index f9af4d59459e..c9d6d04684fe 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -529,7 +529,7 @@ static inline struct pio *pio_list_pop(struct list_head *pio_list)
}
extern void md_page_insert(struct ploop *ploop, struct md_page *md);
-extern void free_md_page(struct md_page *md);
+extern void ploop_free_md_page(struct md_page *md);
extern void free_md_pages_tree(struct rb_root *root);
extern bool try_update_bat_entry(struct ploop *ploop, unsigned int cluster,
u8 level, unsigned int dst_cluster);
@@ -549,8 +549,8 @@ 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 int ploop_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);
extern int ploop_prepare_reloc_index_wb(struct ploop *, struct ploop_index_wb *,
@@ -572,6 +572,6 @@ extern void cleanup_backup(struct ploop *ploop);
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 pio *pio);
+extern void ploop_call_rw_iter(struct file *file, loff_t pos, unsigned rw,
+ struct iov_iter *iter, struct pio *pio);
#endif /* __DM_PLOOP_H */
More information about the Devel
mailing list