summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2010-07-22 03:11:48 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-11 06:18:43 +0200
commit496ee9b8f349a8ae2065114c414a47e89bdeb930 (patch)
tree4f20840fbaf0016df62be4d7bfc83f4e93c17b4e /include
parentAdd v7 alias (diff)
downloadlinux-496ee9b8f349a8ae2065114c414a47e89bdeb930.tar.xz
linux-496ee9b8f349a8ae2065114c414a47e89bdeb930.zip
V7: Adjust sanity checks for some volumes
Newly mkfs-ed filesystems from Seventh Edition have last modification time set to zero, but are otherwise perfectly valid. Also, tighten up other sanity checks to filter out most filesystems with different bytesex than we're using. Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sysv_fs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sysv_fs.h b/include/linux/sysv_fs.h
index 96411306eec6..e47d6d90023d 100644
--- a/include/linux/sysv_fs.h
+++ b/include/linux/sysv_fs.h
@@ -148,6 +148,17 @@ struct v7_super_block {
char s_fname[6]; /* file system name */
char s_fpack[6]; /* file system pack name */
};
+/* Constants to aid sanity checking */
+/* This is not a hard limit, nor enforced by v7 kernel. It's actually just
+ * the limit used by Seventh Edition's ls, though is high enough to assume
+ * that no reasonable file system would have that much entries in root
+ * directory. Thus, if we see anything higher, we just probably got the
+ * endiannes wrong. */
+#define V7_NFILES 1024
+/* The disk addresses are three-byte (despite direct block addresses being
+ * aligned word-wise in inode). If the most significant byte is non-zero,
+ * something is most likely wrong (not a filesystem, bad bytesex). */
+#define V7_MAXSIZE 0x00ffffff
/* Coherent super-block data on disk */
#define COH_NICINOD 100 /* number of inode cache entries */