summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2006-06-25 05:47:30 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:04 -0700
commitee3ffd6c126323693b3b32a71a1f1acfce30bd66 (patch)
tree942b653ebc46c5c4f246ddee8a89b154122f1493 /include
parent577a82752f95a5680d7c14569ffd3fd630d9fb22 (diff)
downloadlinux-ee3ffd6c126323693b3b32a71a1f1acfce30bd66.tar.bz2
[PATCH] ufs: make fsck -f happy
ufs super block contains some statistic about file systems, like amount of directories, free blocks, inodes and so on. UFS1 hold this information in one location and uses 32bit integers for such information, UFS2 hold statistic in another location and uses 64bit integers. There is transition variant, if UFS1 has type 44BSD and flags field in super block has some special value this mean that we work with statistic like UFS2 does. and this also means that nobody care about old(UFS1) statistic. So if start fsck against such file system, after usage linux ufs driver, it found error: at now only UFS1 like statistic is updated. This patch should fix this. Also it contains some minor cleanup: CodingSytle and remove unused variables. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ufs_fs.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 87b0a658bec8..9a7f9b26564d 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -351,6 +351,17 @@ struct ufs2_csum_total {
__fs64 cs_spare[3]; /* future expansion */
};
+/*
+ * File system flags
+ */
+#define UFS_UNCLEAN 0x01 /* file system not clean at mount (unused) */
+#define UFS_DOSOFTDEP 0x02 /* file system using soft dependencies */
+#define UFS_NEEDSFSCK 0x04 /* needs sync fsck (FreeBSD compat, unused) */
+#define UFS_INDEXDIRS 0x08 /* kernel supports indexed directories */
+#define UFS_ACLS 0x10 /* file system has ACLs enabled */
+#define UFS_MULTILABEL 0x20 /* file system is MAC multi-label */
+#define UFS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */
+
#if 0
/*
* This is the actual superblock, as it is laid out on the disk.
@@ -433,7 +444,7 @@ struct ufs_super_block {
__s8 fs_fmod; /* super block modified flag */
__s8 fs_clean; /* file system is clean flag */
__s8 fs_ronly; /* mounted read-only flag */
- __s8 fs_flags; /* currently unused flag */
+ __s8 fs_flags;
union {
struct {
__s8 fs_fsmnt[UFS_MAXMNTLEN];/* name mounted on */
@@ -704,6 +715,7 @@ struct ufs_cg_private_info {
struct ufs_sb_private_info {
struct ufs_buffer_head s_ubh; /* buffer containing super block */
+ struct ufs2_csum_total cs_total;
__u32 s_sblkno; /* offset of super-blocks in filesys */
__u32 s_cblkno; /* offset of cg-block in filesys */
__u32 s_iblkno; /* offset of inode-blocks in filesys */