Whamcloud - gitweb
- make default key timelife 3 days long
[fs/lustre-release.git] / lustre / include / linux / lustre_smfs.h
index e6cede1..3ef1a4b 100644 (file)
@@ -32,6 +32,12 @@ struct snap_inode_info {
         int sn_index;           /*the inode snap_index*/
         ino_t sn_root_ino;        /*the root ino of this snap*/
 };
+
+struct audit_inode_info {
+        __u64 au_mask;
+        __u8  au_valid;
+};
+
 struct smfs_inode_info {
         /* this first part of struct should be the same as in mds_info_info */
         //struct lustre_id smi_id;
@@ -39,6 +45,7 @@ struct smfs_inode_info {
         /* smfs part. */
         struct inode *smi_inode;
         __u32  smi_flags;
+        struct audit_inode_info au_info;
        struct snap_inode_info sm_sninfo;
 };
 #if 0
@@ -381,6 +388,26 @@ static inline void duplicate_file(struct file *dst_file, struct file *src_file)
        #endif
        }
 }
+static inline void pre_smfs_file(struct file * file, loff_t *off,
+                                 loff_t **backfs_off)
+{
+               
+        if (off != &file->f_pos)
+                *backfs_off = off;
+        else
+                *backfs_off = &(F2CF(file)->f_pos);
+        
+        F2CF(file)->f_pos = file->f_pos;
+        pre_smfs_inode(file->f_dentry->d_inode, 
+                       I2CI(file->f_dentry->d_inode));
+}
+
+static inline void post_smfs_file(struct file *file)
+{
+        post_smfs_inode(file->f_dentry->d_inode,
+                        I2CI(file->f_dentry->d_inode));
+        duplicate_file(file, F2CF(file));
+}
 
 static inline void duplicate_sb(struct super_block *dst_sb,
                                 struct super_block *src_sb)