aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-01-22 12:46:56 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:59 -0400
commited0dab6b86cee64e9072107f65fa40629f162b38 (patch)
tree40ef1188dead7599796a01adfcece2565c901129 /fs/btrfs/super.c
parentf0c5da1446cc500856a5e31c9a0e2a7bdd30e663 (diff)
Btrfs: Add basic lockfs calls
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b6982f0133cf..8b52c69fda2e 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -429,6 +429,17 @@ static struct file_system_type btrfs_fs_type = {
429 .kill_sb = kill_block_super, 429 .kill_sb = kill_block_super,
430 .fs_flags = FS_REQUIRES_DEV, 430 .fs_flags = FS_REQUIRES_DEV,
431}; 431};
432static void btrfs_write_super_lockfs(struct super_block *sb)
433{
434 struct btrfs_root *root = btrfs_sb(sb);
435 btrfs_transaction_flush_work(root);
436}
437
438static void btrfs_unlockfs(struct super_block *sb)
439{
440 struct btrfs_root *root = btrfs_sb(sb);
441 btrfs_transaction_queue_work(root, HZ * 30);
442}
432 443
433static struct super_operations btrfs_super_ops = { 444static struct super_operations btrfs_super_ops = {
434 .delete_inode = btrfs_delete_inode, 445 .delete_inode = btrfs_delete_inode,
@@ -442,8 +453,9 @@ static struct super_operations btrfs_super_ops = {
442 .alloc_inode = btrfs_alloc_inode, 453 .alloc_inode = btrfs_alloc_inode,
443 .destroy_inode = btrfs_destroy_inode, 454 .destroy_inode = btrfs_destroy_inode,
444 .statfs = btrfs_statfs, 455 .statfs = btrfs_statfs,
456 .write_super_lockfs = btrfs_write_super_lockfs,
457 .unlockfs = btrfs_unlockfs,
445}; 458};
446
447static int __init init_btrfs_fs(void) 459static int __init init_btrfs_fs(void)
448{ 460{
449 int err; 461 int err;