linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] md: keep recovery_cp in mdp_superblock_s
@ 2025-08-15  4:00 Xiao Ni
  2025-08-16  0:51 ` Yu Kuai
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Ni @ 2025-08-15  4:00 UTC (permalink / raw)
  To: yukuai3; +Cc: linan666, linux-raid, yukuai1

commit 907a99c314a5 ("md: rename recovery_cp to resync_offset") replaces
recovery_cp with resync_offset in mdp_superblock_s which is in md_p.h.
md_p.h is used in userspace too. So mdadm building fails because of this.
This patch revert this change.

Fixes: 907a99c314a5 ("md: rename recovery_cp to resync_offset")
Signed-off-by: Xiao Ni <xni@redhat.com>
---
 drivers/md/md.c                | 6 +++---
 include/uapi/linux/raid/md_p.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 772cffe02ff5..3836fc7eff67 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1423,7 +1423,7 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, stru
 		else {
 			if (sb->events_hi == sb->cp_events_hi &&
 				sb->events_lo == sb->cp_events_lo) {
-				mddev->resync_offset = sb->resync_offset;
+				mddev->resync_offset = sb->recovery_cp;
 			} else
 				mddev->resync_offset = 0;
 		}
@@ -1551,13 +1551,13 @@ static void super_90_sync(struct mddev *mddev, struct md_rdev *rdev)
 	mddev->minor_version = sb->minor_version;
 	if (mddev->in_sync)
 	{
-		sb->resync_offset = mddev->resync_offset;
+		sb->recovery_cp = mddev->resync_offset;
 		sb->cp_events_hi = (mddev->events>>32);
 		sb->cp_events_lo = (u32)mddev->events;
 		if (mddev->resync_offset == MaxSector)
 			sb->state = (1<< MD_SB_CLEAN);
 	} else
-		sb->resync_offset = 0;
+		sb->recovery_cp = 0;
 
 	sb->layout = mddev->layout;
 	sb->chunk_size = mddev->chunk_sectors << 9;
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
index b13946287277..ac74133a4768 100644
--- a/include/uapi/linux/raid/md_p.h
+++ b/include/uapi/linux/raid/md_p.h
@@ -173,7 +173,7 @@ typedef struct mdp_superblock_s {
 #else
 #error unspecified endianness
 #endif
-	__u32 resync_offset;	/* 11 resync checkpoint sector count	      */
+	__u32 recovery_cp;	/* 11 resync checkpoint sector count	      */
 	/* There are only valid for minor_version > 90 */
 	__u64 reshape_position;	/* 12,13 next address in array-space for reshape */
 	__u32 new_level;	/* 14 new level we are reshaping to	      */
-- 
2.32.0 (Apple Git-132)


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

* Re: [PATCH 1/1] md: keep recovery_cp in mdp_superblock_s
  2025-08-15  4:00 [PATCH 1/1] md: keep recovery_cp in mdp_superblock_s Xiao Ni
@ 2025-08-16  0:51 ` Yu Kuai
  0 siblings, 0 replies; 2+ messages in thread
From: Yu Kuai @ 2025-08-16  0:51 UTC (permalink / raw)
  To: Xiao Ni, yukuai3; +Cc: linan666, linux-raid, yukuai1

在 2025/8/15 12:00, Xiao Ni 写道:

> commit 907a99c314a5 ("md: rename recovery_cp to resync_offset") replaces
> recovery_cp with resync_offset in mdp_superblock_s which is in md_p.h.
> md_p.h is used in userspace too. So mdadm building fails because of this.
> This patch revert this change.
>
> Fixes: 907a99c314a5 ("md: rename recovery_cp to resync_offset")
> Signed-off-by: Xiao Ni<xni@redhat.com>
> ---
>   drivers/md/md.c                | 6 +++---
>   include/uapi/linux/raid/md_p.h | 2 +-
>   2 files changed, 4 insertions(+), 4 deletions(-)

Applied to md-6.17

Thanks


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

end of thread, other threads:[~2025-08-16  0:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15  4:00 [PATCH 1/1] md: keep recovery_cp in mdp_superblock_s Xiao Ni
2025-08-16  0:51 ` Yu Kuai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).