Commit 68067d0e authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Add write_super_lockfs() and unlock_fs() for snapshot.

Submitted by Steve Best.
parent 7dfc72fa
......@@ -377,6 +377,31 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
return -EINVAL;
}
static void jfs_write_super_lockfs(struct super_block *sb)
{
struct jfs_sb_info *sbi = JFS_SBI(sb);
log_t *log = sbi->log;
if (!(sb->s_flags & MS_RDONLY)) {
txQuiesce(sb);
lmLogShutdown(log);
}
}
static void jfs_unlockfs(struct super_block *sb)
{
struct jfs_sb_info *sbi = JFS_SBI(sb);
log_t *log = sbi->log;
int rc = 0;
if (!(sb->s_flags & MS_RDONLY)) {
if ((rc = lmLogInit(log)))
jERROR(1,
("jfs_unlock failed with return code %d\n", rc));
else
txResume(sb);
}
}
static struct super_block *jfs_get_sb(struct file_system_type *fs_type,
int flags, char *dev_name, void *data)
{
......@@ -390,6 +415,8 @@ static struct super_operations jfs_super_operations = {
.write_inode = jfs_write_inode,
.delete_inode = jfs_delete_inode,
.put_super = jfs_put_super,
.write_super_lockfs = jfs_write_super_lockfs,
.unlockfs = jfs_unlockfs,
.statfs = jfs_statfs,
.remount_fs = jfs_remount,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment