diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2024-07-15 13:32:51 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2024-07-15 13:32:51 +0000 |
commit | 97d5fafae7c7cbcee9acb1b7728880a2274600b5 (patch) | |
tree | da97f8547d70bac875444168af310413eac01ef7 /sbin | |
parent | 0f32d818005ace6903e8835bb6221c9c8e49abd5 (diff) |
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@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/fsck_ext2fs/setup.c | 6 |
1 files changed, 5 insertions, 1 deletions
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))) { |