diff mbox series

[RFC,27/31] btrfs: Rename end_bio_extent_readpage to btrfs_readpage_endio

Message ID 44c8d4d3345eeef03be7ed7c9e78e22f6c827dab.1623567940.git.rgoldwyn@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs buffered iomap support | expand

Commit Message

Goldwyn Rodrigues June 13, 2021, 1:39 p.m. UTC
From: Goldwyn Rodrigues <rgoldwyn@suse.com>

Also, declare it in extent_io.h so it may be used by bio submission
function.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 fs/btrfs/extent_io.c | 12 ++++++------
 fs/btrfs/extent_io.h |  1 +
 2 files changed, 7 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 71a59fbeffe1..b0a01e3e4e7f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2970,7 +2970,7 @@  static void begin_page_read(struct btrfs_fs_info *fs_info, struct page *page)
 /*
  * Find extent buffer for a givne bytenr.
  *
- * This is for end_bio_extent_readpage(), thus we can't do any unsafe locking
+ * This is for btrfs_readpage_endio(), thus we can't do any unsafe locking
  * in endio context.
  */
 static struct extent_buffer *find_extent_buffer_readpage(
@@ -3007,7 +3007,7 @@  static struct extent_buffer *find_extent_buffer_readpage(
  * Scheduling is not allowed, so the extent state tree is expected
  * to have one and only one object corresponding to this IO.
  */
-static void end_bio_extent_readpage(struct bio *bio)
+void btrfs_readpage_endio(struct bio *bio)
 {
 	struct bio_vec *bvec;
 	struct btrfs_io_bio *io_bio = btrfs_io_bio(bio);
@@ -3035,7 +3035,7 @@  static void end_bio_extent_readpage(struct bio *bio)
 		u32 len;
 
 		btrfs_debug(fs_info,
-			"end_bio_extent_readpage: bi_sector=%llu, err=%d, mirror=%u",
+			"btrfs_readpage_endio: bi_sector=%llu, err=%d, mirror=%u",
 			bio->bi_iter.bi_sector, bio->bi_status,
 			io_bio->mirror_num);
 		tree = &BTRFS_I(inode)->io_tree;
@@ -3687,7 +3687,7 @@  int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
 		ret = submit_extent_page(REQ_OP_READ | read_flags, NULL,
 					 bio_ctrl, page, disk_bytenr, iosize,
 					 pg_offset,
-					 end_bio_extent_readpage, 0,
+					 btrfs_readpage_endio, 0,
 					 this_bio_flag,
 					 force_bio_submit);
 		if (!ret) {
@@ -6411,7 +6411,7 @@  static int read_extent_buffer_subpage(struct extent_buffer *eb, int wait,
 	ret = submit_extent_page(REQ_OP_READ | REQ_META, NULL, &bio_ctrl,
 				 page, eb->start, eb->len,
 				 eb->start - page_offset(page),
-				 end_bio_extent_readpage, mirror_num, 0,
+				 btrfs_readpage_endio, mirror_num, 0,
 				 true);
 	if (ret) {
 		/*
@@ -6513,7 +6513,7 @@  int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num)
 			ClearPageError(page);
 			err = submit_extent_page(REQ_OP_READ | REQ_META, NULL,
 					 &bio_ctrl, page, page_offset(page),
-					 PAGE_SIZE, 0, end_bio_extent_readpage,
+					 PAGE_SIZE, 0, btrfs_readpage_endio,
 					 mirror_num, 0, false);
 			if (err) {
 				/*
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 62027f551b44..e3685b071eba 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -287,6 +287,7 @@  int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
 		      unsigned int pg_offset, int mirror_num);
 void end_extent_writepage(struct page *page, int err, u64 start, u64 end);
 int btrfs_repair_eb_io_failure(const struct extent_buffer *eb, int mirror_num);
+void btrfs_readpage_endio(struct bio *bio);
 
 /*
  * When IO fails, either with EIO or csum verification fails, we