[PATCH] Allow file systems to differentiate between data and meta reads
[powerpc.git] / include / linux / fs.h
index 555bc19..d68c37a 100644 (file)
@@ -79,8 +79,8 @@ extern int dir_notify_enable;
 #define WRITE 1
 #define READA 2                /* read-ahead  - don't block if no resources */
 #define SWRITE 3       /* for ll_rw_block() - wait for buffer lock */
-#define SPECIAL 4      /* For non-blockdevice requests in request queue */
 #define READ_SYNC      (READ | (1 << BIO_RW_SYNC))
+#define READ_META      (READ | (1 << BIO_RW_META))
 #define WRITE_SYNC     (WRITE | (1 << BIO_RW_SYNC))
 #define WRITE_BARRIER  ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))
 
@@ -92,9 +92,10 @@ extern int dir_notify_enable;
 #define FS_REQUIRES_DEV 1 
 #define FS_BINARY_MOUNTDATA 2
 #define FS_REVAL_DOT   16384   /* Check the paths ".", ".." for staleness */
-#define FS_ODD_RENAME  32768   /* Temporary stuff; will go away as soon
-                                 * as nfs_rename() will be cleaned up
-                                 */
+#define FS_RENAME_DOES_D_MOVE  32768   /* FS will handle d_move()
+                                        * during rename() internally.
+                                        */
+
 /*
  * These are the fs-independent mount-flags: up to 32 flags are supported
  */
@@ -511,7 +512,6 @@ struct inode {
        struct timespec         i_mtime;
        struct timespec         i_ctime;
        unsigned int            i_blkbits;
-       unsigned long           i_blksize;
        unsigned long           i_version;
        blkcnt_t                i_blocks;
        unsigned short          i_bytes;
@@ -527,11 +527,12 @@ struct inode {
 #ifdef CONFIG_QUOTA
        struct dquot            *i_dquot[MAXQUOTAS];
 #endif
-       /* These three should probably be a union */
        struct list_head        i_devices;
-       struct pipe_inode_info  *i_pipe;
-       struct block_device     *i_bdev;
-       struct cdev             *i_cdev;
+       union {
+               struct pipe_inode_info  *i_pipe;
+               struct block_device     *i_bdev;
+               struct cdev             *i_cdev;
+       };
        int                     i_cindex;
 
        __u32                   i_generation;
@@ -552,10 +553,10 @@ struct inode {
        unsigned int            i_flags;
 
        atomic_t                i_writecount;
+#ifdef CONFIG_SECURITY
        void                    *i_security;
-       union {
-               void            *generic_ip;
-       } u;
+#endif
+       void                    *i_private; /* fs or device private pointer */
 #ifdef __NEED_I_SIZE_ORDERED
        seqcount_t              i_size_seqcount;
 #endif
@@ -646,7 +647,6 @@ struct fown_struct {
        rwlock_t lock;          /* protects pid, uid, euid fields */
        int pid;                /* pid or -pgrp where SIGIO should be sent */
        uid_t uid, euid;        /* uid/euid of process setting the owner */
-       void *security;
        int signum;             /* posix.1b rt signal to be delivered on IO */
 };
 
@@ -689,8 +689,9 @@ struct file {
        struct file_ra_state    f_ra;
 
        unsigned long           f_version;
+#ifdef CONFIG_SECURITY
        void                    *f_security;
-
+#endif
        /* needed for tty driver, and maybe others */
        void                    *private_data;
 
@@ -878,7 +879,9 @@ struct super_block {
        int                     s_syncing;
        int                     s_need_sync_fs;
        atomic_t                s_active;
+#ifdef CONFIG_SECURITY
        void                    *s_security;
+#endif
        struct xattr_handler    **s_xattr;
 
        struct list_head        s_inodes;       /* all inodes */
@@ -1144,9 +1147,10 @@ struct super_operations {
 
        int (*show_options)(struct seq_file *, struct vfsmount *);
        int (*show_stats)(struct seq_file *, struct vfsmount *);
-
+#ifdef CONFIG_QUOTA
        ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
        ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
+#endif
 };
 
 /* Inode state bits.  Protected by inode_lock. */