diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/Kconfig | 18 | ||||
-rw-r--r-- | fs/btrfs/super.c | 12 |
2 files changed, 25 insertions, 5 deletions
diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig new file mode 100644 index 000000000000..f8fcf999ea1b --- /dev/null +++ b/fs/btrfs/Kconfig | |||
@@ -0,0 +1,18 @@ | |||
1 | config BTRFS_FS | ||
2 | tristate "Btrfs filesystem (EXPERIMENTAL) Unstable disk format" | ||
3 | depends on EXPERIMENTAL | ||
4 | select LIBCRC32C | ||
5 | select ZLIB_INFLATE | ||
6 | select ZLIB_DEFLATE | ||
7 | help | ||
8 | Btrfs is a new filesystem with extents, writable snapshotting, | ||
9 | support for multiple devices and many more features. | ||
10 | |||
11 | Btrfs is highly experimental, and THE DISK FORMAT IS NOT YET | ||
12 | FINALIZED. You should say N here unless you are interested in | ||
13 | testing Btrfs with non-critical data. | ||
14 | |||
15 | To compile this file system support as a module, choose M here. The | ||
16 | module will be called btrfs. | ||
17 | |||
18 | If unsure, say N. | ||
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 4c0b7569ba52..f3fd7e2cbc38 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/ctype.h> | 37 | #include <linux/ctype.h> |
38 | #include <linux/namei.h> | 38 | #include <linux/namei.h> |
39 | #include <linux/miscdevice.h> | 39 | #include <linux/miscdevice.h> |
40 | #include <linux/magic.h> | ||
40 | #include "compat.h" | 41 | #include "compat.h" |
41 | #include "ctree.h" | 42 | #include "ctree.h" |
42 | #include "disk-io.h" | 43 | #include "disk-io.h" |
@@ -50,7 +51,6 @@ | |||
50 | #include "export.h" | 51 | #include "export.h" |
51 | #include "compression.h" | 52 | #include "compression.h" |
52 | 53 | ||
53 | #define BTRFS_SUPER_MAGIC 0x9123683E | ||
54 | 54 | ||
55 | static struct super_operations btrfs_super_ops; | 55 | static struct super_operations btrfs_super_ops; |
56 | 56 | ||
@@ -606,18 +606,20 @@ out: | |||
606 | return ret; | 606 | return ret; |
607 | } | 607 | } |
608 | 608 | ||
609 | static void btrfs_write_super_lockfs(struct super_block *sb) | 609 | static int btrfs_freeze(struct super_block *sb) |
610 | { | 610 | { |
611 | struct btrfs_root *root = btrfs_sb(sb); | 611 | struct btrfs_root *root = btrfs_sb(sb); |
612 | mutex_lock(&root->fs_info->transaction_kthread_mutex); | 612 | mutex_lock(&root->fs_info->transaction_kthread_mutex); |
613 | mutex_lock(&root->fs_info->cleaner_mutex); | 613 | mutex_lock(&root->fs_info->cleaner_mutex); |
614 | return 0; | ||
614 | } | 615 | } |
615 | 616 | ||
616 | static void btrfs_unlockfs(struct super_block *sb) | 617 | static int btrfs_unfreeze(struct super_block *sb) |
617 | { | 618 | { |
618 | struct btrfs_root *root = btrfs_sb(sb); | 619 | struct btrfs_root *root = btrfs_sb(sb); |
619 | mutex_unlock(&root->fs_info->cleaner_mutex); | 620 | mutex_unlock(&root->fs_info->cleaner_mutex); |
620 | mutex_unlock(&root->fs_info->transaction_kthread_mutex); | 621 | mutex_unlock(&root->fs_info->transaction_kthread_mutex); |
622 | return 0; | ||
621 | } | 623 | } |
622 | 624 | ||
623 | static struct super_operations btrfs_super_ops = { | 625 | static struct super_operations btrfs_super_ops = { |
@@ -632,8 +634,8 @@ static struct super_operations btrfs_super_ops = { | |||
632 | .destroy_inode = btrfs_destroy_inode, | 634 | .destroy_inode = btrfs_destroy_inode, |
633 | .statfs = btrfs_statfs, | 635 | .statfs = btrfs_statfs, |
634 | .remount_fs = btrfs_remount, | 636 | .remount_fs = btrfs_remount, |
635 | .write_super_lockfs = btrfs_write_super_lockfs, | 637 | .freeze_fs = btrfs_freeze, |
636 | .unlockfs = btrfs_unlockfs, | 638 | .unfreeze_fs = btrfs_unfreeze, |
637 | }; | 639 | }; |
638 | 640 | ||
639 | static const struct file_operations btrfs_ctl_fops = { | 641 | static const struct file_operations btrfs_ctl_fops = { |