diff mbox series

[05/11] md-bitmap: rename read_page to read_file_page

Message ID 20230615064840.629492-6-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/11] md-bitmap: set BITMAP_WRITE_ERROR in write_sb_page | expand

Commit Message

Christoph Hellwig June 15, 2023, 6:48 a.m. UTC
Make the difference to read_sb_page clear.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/md/md-bitmap.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Hannes Reinecke June 15, 2023, 6:59 a.m. UTC | #1
On 6/15/23 08:48, Christoph Hellwig wrote:
> Make the difference to read_sb_page clear.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/md/md-bitmap.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Johannes Thumshirn June 15, 2023, 2:38 p.m. UTC | #2
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Himanshu Madhani June 15, 2023, 6:14 p.m. UTC | #3
> On Jun 14, 2023, at 11:48 PM, Christoph Hellwig <hch@lst.de> wrote:
> 
> Make the difference to read_sb_page clear.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/md/md-bitmap.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> index 46fbcfc9d1fcac..fa0f6ca7b61b0b 100644
> --- a/drivers/md/md-bitmap.c
> +++ b/drivers/md/md-bitmap.c
> @@ -348,10 +348,8 @@ static void free_buffers(struct page *page)
>  * This usage is similar to how swap files are handled, and allows us
>  * to write to a file with no concerns of memory allocation failing.
>  */
> -static int read_page(struct file *file, unsigned long index,
> -     struct bitmap *bitmap,
> -     unsigned long count,
> -     struct page *page)
> +static int read_file_page(struct file *file, unsigned long index,
> + struct bitmap *bitmap, unsigned long count, struct page *page)
> {
> int ret = 0;
> struct inode *inode = file_inode(file);
> @@ -632,7 +630,7 @@ static int md_bitmap_read_sb(struct bitmap *bitmap)
> loff_t isize = i_size_read(bitmap->storage.file->f_mapping->host);
> int bytes = isize > PAGE_SIZE ? PAGE_SIZE : isize;
> 
> - err = read_page(bitmap->storage.file, 0,
> + err = read_file_page(bitmap->storage.file, 0,
> bitmap, bytes, sb_page);
> } else {
> err = read_sb_page(bitmap->mddev,
> @@ -1141,7 +1139,7 @@ static int md_bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
> count = PAGE_SIZE;
> page = store->filemap[index];
> if (file)
> - ret = read_page(file, index, bitmap,
> + ret = read_file_page(file, index, bitmap,
> count, page);
> else
> ret = read_sb_page(
> -- 
> 2.39.2
> 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 46fbcfc9d1fcac..fa0f6ca7b61b0b 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -348,10 +348,8 @@  static void free_buffers(struct page *page)
  * This usage is similar to how swap files are handled, and allows us
  * to write to a file with no concerns of memory allocation failing.
  */
-static int read_page(struct file *file, unsigned long index,
-		     struct bitmap *bitmap,
-		     unsigned long count,
-		     struct page *page)
+static int read_file_page(struct file *file, unsigned long index,
+		struct bitmap *bitmap, unsigned long count, struct page *page)
 {
 	int ret = 0;
 	struct inode *inode = file_inode(file);
@@ -632,7 +630,7 @@  static int md_bitmap_read_sb(struct bitmap *bitmap)
 		loff_t isize = i_size_read(bitmap->storage.file->f_mapping->host);
 		int bytes = isize > PAGE_SIZE ? PAGE_SIZE : isize;
 
-		err = read_page(bitmap->storage.file, 0,
+		err = read_file_page(bitmap->storage.file, 0,
 				bitmap, bytes, sb_page);
 	} else {
 		err = read_sb_page(bitmap->mddev,
@@ -1141,7 +1139,7 @@  static int md_bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
 				count = PAGE_SIZE;
 			page = store->filemap[index];
 			if (file)
-				ret = read_page(file, index, bitmap,
+				ret = read_file_page(file, index, bitmap,
 						count, page);
 			else
 				ret = read_sb_page(