[PATCH] fs: reorder some 'struct inode' fields to speedup i_size manipulations
[safe/jmp/linux-2.6] / include / linux / ufs_fs.h
index 914f911..28967ed 100644 (file)
@@ -351,6 +351,14 @@ struct ufs2_csum_total {
        __fs64   cs_spare[3];   /* future expansion */
 };
 
+struct ufs_csum_core {
+       __u64   cs_ndir;        /* number of directories */
+       __u64   cs_nbfree;      /* number of free blocks */
+       __u64   cs_nifree;      /* number of free inodes */
+       __u64   cs_nffree;      /* number of free frags */
+       __u64   cs_numclusters; /* number of free clusters */
+};
+
 /*
  * File system flags
  */
@@ -715,7 +723,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;
+       struct ufs_csum_core 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 */
@@ -900,7 +908,7 @@ struct ufs_super_block_third {
                        __fs64   fs_csaddr;     /* blk addr of cyl grp summary area */
                        __fs64    fs_pendingblocks;/* blocks in process of being freed */
                        __fs32    fs_pendinginodes;/*inodes in process of being freed */
-               } fs_u2;
+               } __attribute__ ((packed)) fs_u2;
        } fs_un1;
        union {
                struct {
@@ -966,7 +974,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
 extern struct inode_operations ufs_file_inode_operations;
 extern const struct file_operations ufs_file_operations;
 
-extern struct address_space_operations ufs_aops;
+extern const struct address_space_operations ufs_aops;
 
 /* ialloc.c */
 extern void ufs_free_inode (struct inode *inode);
@@ -993,7 +1001,7 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __
 extern struct inode_operations ufs_fast_symlink_inode_operations;
 
 /* truncate.c */
-extern void ufs_truncate (struct inode *);
+extern int ufs_truncate (struct inode *, loff_t);
 
 static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
 {