All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] md: Fix bitmap offset type in sb writer
@ 2023-04-25  1:14 Jonathan Derrick
  2023-04-26  3:44 ` Song Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Derrick @ 2023-04-25  1:14 UTC (permalink / raw)
  To: Song Liu; +Cc: linux-raid, Dan Carpenter, Jonathan Derrick

Bitmap offset is allowed to be negative, indicating that bitmap precedes
metadata. Change the type back from sector_t to loff_t to satisfy
conditionals and calculations.

Signed-off-by: Jonathan Derrick <jonathan.derrick@linux.dev>
---
 drivers/md/md-bitmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 920bb68156d2..29ae7f7015e4 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -237,8 +237,8 @@ static int __write_sb_page(struct md_rdev *rdev, struct bitmap *bitmap,
 	struct block_device *bdev;
 	struct mddev *mddev = bitmap->mddev;
 	struct bitmap_storage *store = &bitmap->storage;
-	sector_t offset = mddev->bitmap_info.offset;
-	sector_t ps, sboff, doff;
+	loff_t sboff, offset = mddev->bitmap_info.offset;
+	sector_t ps, doff;
 	unsigned int size = PAGE_SIZE;
 	unsigned int opt_size = PAGE_SIZE;
 
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-28  7:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25  1:14 [PATCH] md: Fix bitmap offset type in sb writer Jonathan Derrick
2023-04-26  3:44 ` Song Liu
2023-04-26 17:58   ` Song Liu
2023-04-26 19:08     ` Jonathan Derrick
2023-04-27  9:35     ` Yu Kuai
2023-04-27 17:45       ` Song Liu
2023-04-28  2:04         ` Yu Kuai
2023-04-28  7:23           ` Yu Kuai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.