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;
/* smfs part. */
struct inode *smi_inode;
__u32 smi_flags;
+ struct audit_inode_info au_info;
struct snap_inode_info sm_sninfo;
};
#if 0
char *smsi_ftype; /* file system type */
struct obd_export *smsi_exp; /* file system obd exp */
struct snap_super_info *smsi_snap_info; /* snap table cow */
- //smfs_pack_rec_func smsi_pack_rec[PACK_MAX]; /* sm_pack_rec type ops */
- struct rw_semaphore plg_sem; /*rw semaphore to protect plg operations */
- __u32 plg_flags; /* flags */
+
+ struct rw_semaphore plg_sem; /* rw semaphore to protect
+ * plg operations */
+ __u32 plg_flags; /* flags */
__u32 smsi_flags;
__u32 smsi_ops_check;
struct list_head smsi_plg_list;
- //kmem_cache_t * smsi_inode_cachep; /*inode_cachep*/
};
#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)
if (!parent_dentry)
cache_dentry->d_parent = cache_dentry;
+ //defines d_delete op to force killing dentry
+ cache_dentry->d_op = &sm_dop;
+
if (cache_inode) {
atomic_inc(&cache_inode->i_count); //d_instantiate suppose that
d_add(cache_dentry, cache_inode);
}
- //defines d_delete op to force killing dentry
- cache_dentry->d_op = &sm_dop;
RETURN(cache_dentry);
}
return 0;
}
-
extern int smfs_write_extents(struct inode *dir, struct dentry *dentry,
unsigned long from, unsigned long num);
extern int smfs_rec_precreate(struct dentry *dentry, int *num, struct obdo *oa);