Commit ed0dab6b authored by Yan's avatar Yan Committed by Chris Mason

Btrfs: Add basic lockfs calls

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent f0c5da14
...@@ -429,6 +429,17 @@ static struct file_system_type btrfs_fs_type = { ...@@ -429,6 +429,17 @@ static struct file_system_type btrfs_fs_type = {
.kill_sb = kill_block_super, .kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
static void btrfs_write_super_lockfs(struct super_block *sb)
{
struct btrfs_root *root = btrfs_sb(sb);
btrfs_transaction_flush_work(root);
}
static void btrfs_unlockfs(struct super_block *sb)
{
struct btrfs_root *root = btrfs_sb(sb);
btrfs_transaction_queue_work(root, HZ * 30);
}
static struct super_operations btrfs_super_ops = { static struct super_operations btrfs_super_ops = {
.delete_inode = btrfs_delete_inode, .delete_inode = btrfs_delete_inode,
...@@ -442,8 +453,9 @@ static struct super_operations btrfs_super_ops = { ...@@ -442,8 +453,9 @@ static struct super_operations btrfs_super_ops = {
.alloc_inode = btrfs_alloc_inode, .alloc_inode = btrfs_alloc_inode,
.destroy_inode = btrfs_destroy_inode, .destroy_inode = btrfs_destroy_inode,
.statfs = btrfs_statfs, .statfs = btrfs_statfs,
.write_super_lockfs = btrfs_write_super_lockfs,
.unlockfs = btrfs_unlockfs,
}; };
static int __init init_btrfs_fs(void) static int __init init_btrfs_fs(void)
{ {
int err; int err;
......
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