Skip to content

Commit c279732

Browse files
XiaoNi87YuKuai-huawei
authored andcommitted
md: keep recovery_cp in mdp_superblock_s
commit 907a99c ("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: 907a99c ("md: rename recovery_cp to resync_offset") Signed-off-by: Xiao Ni <[email protected]> Link: https://lore.kernel.org/linux-raid/[email protected] Signed-off-by: Yu Kuai <[email protected]>
1 parent 25db5f2 commit c279732

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/md/md.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, stru
14231423
else {
14241424
if (sb->events_hi == sb->cp_events_hi &&
14251425
sb->events_lo == sb->cp_events_lo) {
1426-
mddev->resync_offset = sb->resync_offset;
1426+
mddev->resync_offset = sb->recovery_cp;
14271427
} else
14281428
mddev->resync_offset = 0;
14291429
}
@@ -1551,13 +1551,13 @@ static void super_90_sync(struct mddev *mddev, struct md_rdev *rdev)
15511551
mddev->minor_version = sb->minor_version;
15521552
if (mddev->in_sync)
15531553
{
1554-
sb->resync_offset = mddev->resync_offset;
1554+
sb->recovery_cp = mddev->resync_offset;
15551555
sb->cp_events_hi = (mddev->events>>32);
15561556
sb->cp_events_lo = (u32)mddev->events;
15571557
if (mddev->resync_offset == MaxSector)
15581558
sb->state = (1<< MD_SB_CLEAN);
15591559
} else
1560-
sb->resync_offset = 0;
1560+
sb->recovery_cp = 0;
15611561

15621562
sb->layout = mddev->layout;
15631563
sb->chunk_size = mddev->chunk_sectors << 9;

include/uapi/linux/raid/md_p.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ typedef struct mdp_superblock_s {
173173
#else
174174
#error unspecified endianness
175175
#endif
176-
__u32 resync_offset; /* 11 resync checkpoint sector count */
176+
__u32 recovery_cp; /* 11 resync checkpoint sector count */
177177
/* There are only valid for minor_version > 90 */
178178
__u64 reshape_position; /* 12,13 next address in array-space for reshape */
179179
__u32 new_level; /* 14 new level we are reshaping to */

0 commit comments

Comments
 (0)