Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_ext2fs divorce list of features supported by fsck_...
details: https://anonhg.NetBSD.org/src/rev/f91b4eb3300c
branches: trunk
changeset: 347141:f91b4eb3300c
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Aug 15 18:42:15 2016 +0000
description:
divorce list of features supported by fsck_ext2fs from the kernel;
while kernel might support e.g. extents, extra_isize or dir_nlink,
fsck could actually have no idea about the features
diffstat:
sbin/fsck_ext2fs/fsck.h | 13 ++++++++++++-
sbin/fsck_ext2fs/setup.c | 8 ++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diffs (56 lines):
diff -r a3dfe2e774ac -r f91b4eb3300c sbin/fsck_ext2fs/fsck.h
--- a/sbin/fsck_ext2fs/fsck.h Mon Aug 15 18:38:10 2016 +0000
+++ b/sbin/fsck_ext2fs/fsck.h Mon Aug 15 18:42:15 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.15 2009/10/19 18:41:08 bouyer Exp $ */
+/* $NetBSD: fsck.h,v 1.16 2016/08/15 18:42:15 jdolecek Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -230,6 +230,17 @@
#define ALTERED 0x08
#define FOUND 0x10
+/*
+ * Kernel support for features doesn't imply fsck support
+ */
+#define EXT2F_COMPAT_SUPP_FSCK 0x00
+#define EXT2F_ROCOMPAT_SUPP_FSCK (EXT2F_ROCOMPAT_SPARSESUPER \
+ | EXT2F_ROCOMPAT_LARGEFILE \
+ | EXT2F_ROCOMPAT_HUGE_FILE \
+ )
+#define EXT2F_INCOMPAT_SUPP_FSCK (EXT2F_INCOMPAT_FTYPE \
+ )
+
struct ext2fs_dinode *ginode(ino_t);
struct inoinfo *getinoinfo(ino_t);
void getblk(struct bufarea *, daddr_t, long);
diff -r a3dfe2e774ac -r f91b4eb3300c sbin/fsck_ext2fs/setup.c
--- a/sbin/fsck_ext2fs/setup.c Mon Aug 15 18:38:10 2016 +0000
+++ b/sbin/fsck_ext2fs/setup.c Mon Aug 15 18:42:15 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.32 2014/12/04 01:41:37 christos Exp $ */
+/* $NetBSD: setup.c,v 1.33 2016/08/15 18:42:15 jdolecek Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -58,7 +58,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.5 (Berkeley) 11/23/94";
#else
-__RCSID("$NetBSD: setup.c,v 1.32 2014/12/04 01:41:37 christos Exp $");
+__RCSID("$NetBSD: setup.c,v 1.33 2016/08/15 18:42:15 jdolecek Exp $");
#endif
#endif /* not lint */
@@ -377,8 +377,8 @@
asblk.b_un.b_fs->e2fs_features_rocompat |=
sblk.b_un.b_fs->e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGEFILE;
if (sblock.e2fs.e2fs_rev > E2FS_REV0 &&
- ((sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP) ||
- (sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP))) {
+ ((sblock.e2fs.e2fs_features_incompat & ~EXT2F_INCOMPAT_SUPP_FSCK) ||
+ (sblock.e2fs.e2fs_features_rocompat & ~EXT2F_ROCOMPAT_SUPP_FSCK))) {
if (debug) {
printf("compat 0x%08x, incompat 0x%08x, compat_ro "
"0x%08x\n",
Home |
Main Index |
Thread Index |
Old Index