aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2010-08-10 21:03:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:22 -0400
commit0bcaa65a56ab74003666cf741b0bfa1e9263a11c (patch)
tree580445e4f38cf6894ff695069edcc048b09870dd /include
parenta36517e9302b8396db24600bf9f67e4d1c441907 (diff)
fs/sysv: 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 [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 {
148 char s_fname[6]; /* file system name */ 148 char s_fname[6]; /* file system name */
149 char s_fpack[6]; /* file system pack name */ 149 char s_fpack[6]; /* file system pack name */
150}; 150};
151/* Constants to aid sanity checking */
152/* This is not a hard limit, nor enforced by v7 kernel. It's actually just
153 * the limit used by Seventh Edition's ls, though is high enough to assume
154 * that no reasonable file system would have that much entries in root
155 * directory. Thus, if we see anything higher, we just probably got the
156 * endiannes wrong. */
157#define V7_NFILES 1024
158/* The disk addresses are three-byte (despite direct block addresses being
159 * aligned word-wise in inode). If the most significant byte is non-zero,
160 * something is most likely wrong (not a filesystem, bad bytesex). */
161#define V7_MAXSIZE 0x00ffffff
151 162
152/* Coherent super-block data on disk */ 163/* Coherent super-block data on disk */
153#define COH_NICINOD 100 /* number of inode cache entries */ 164#define COH_NICINOD 100 /* number of inode cache entries */