From 97d5fafae7c7cbcee9acb1b7728880a2274600b5 Mon Sep 17 00:00:00 2001 From: Martijn van Duren Date: Mon, 15 Jul 2024 13:32:51 +0000 Subject: Add e2fs_fsmnt, and the newly defined e2fs_kbytes_written to the list of fields that can differ between the primary and 1st backup superblock. This fixes fsck issues I've encountered on my system with a shared home partition. OK miod@ --- sbin/fsck_ext2fs/setup.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/fsck_ext2fs/setup.c b/sbin/fsck_ext2fs/setup.c index 1b11f10adaf..d1508963b12 100644 --- a/sbin/fsck_ext2fs/setup.c +++ b/sbin/fsck_ext2fs/setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: setup.c,v 1.33 2019/07/01 07:13:44 kevlo Exp $ */ +/* $OpenBSD: setup.c,v 1.34 2024/07/15 13:32:50 martijn Exp $ */ /* $NetBSD: setup.c,v 1.1 1997/06/11 11:22:01 bouyer Exp $ */ /* @@ -347,6 +347,10 @@ readsb(int listerr) asblk.b_un.b_fs->e2fs_features_rocompat &= ~EXT2F_ROCOMPAT_LARGE_FILE; asblk.b_un.b_fs->e2fs_features_rocompat |= sblk.b_un.b_fs->e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGE_FILE; + memcpy(asblk.b_un.b_fs->e2fs_fsmnt, sblk.b_un.b_fs->e2fs_fsmnt, + sizeof(sblk.b_un.b_fs->e2fs_fsmnt)); + asblk.b_un.b_fs->e2fs_kbytes_written = sblk.b_un.b_fs->e2fs_kbytes_written; + if (sblock.e2fs.e2fs_rev > E2FS_REV0 && ((sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP) || (sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP))) { -- cgit v1.2.3