static int smfs_umount_cache(struct smfs_super_info *smb)
{
- iput(smb->smsi_sb->s_root->d_inode);
- dput(smb->smsi_sb->s_root);
+
mntput(smb->smsi_mnt);
smfs_cleanup_sm_ops(smb);
smfs_cleanup_fsfilt_ops(smb);
EXIT;
return;
}
-static void smfs_cleanup_hooks(struct smfs_super_info *smb)
+void smfs_cleanup_hooks(struct smfs_super_info *smb)
{
if (SMFS_CACHE_HOOK(smb))
if (SMFS_DO_COW(smb))
smfs_cow_cleanup(smb);
#endif
+ smfs_cleanup_hook_ops(smb);
}
void smfs_put_super(struct super_block *sb)
smfs_cleanup_hooks(smfs_info);
- smfs_cleanup_hook_ops(smfs_info);
if (sb)
smfs_umount_cache(smfs_info);
smfs_cleanup_smb(sb);
RETURN(NULL);
}
+void *smfs_trans_start(struct inode *inode, int op, void *desc_private)
+{
+ struct fsfilt_operations *fsfilt = S2SMI(inode->i_sb)->sm_fsfilt;
+
+ CDEBUG(D_INFO, "trans start %p\n", fsfilt->fs_start);
+
+ SMFS_TRANS_OP(inode, op);
+
+ /* There are some problem here. fs_start in fsfilt is used by lustre
+ * the journal blocks of write rec are not counted in FIXME later */
+ if (fsfilt->fs_start)
+ return fsfilt->fs_start(inode, op, desc_private, 0);
+ return NULL;
+}
+
+void smfs_trans_commit(struct inode *inode, void *handle, int force_sync)
+{
+ struct fsfilt_operations *fsfilt = S2SMI(inode->i_sb)->sm_fsfilt;
+
+ if (!handle)
+ return;
+
+ CDEBUG(D_INFO, "trans commit %p\n", fsfilt->fs_commit);
+
+ if (fsfilt->fs_commit)
+ fsfilt->fs_commit(inode->i_sb, inode, handle, force_sync);
+}
+