diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 18:49:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 18:49:54 -0500 |
commit | f9156c7288e2d11501ded4d7fe6d9a3a41ee4057 (patch) | |
tree | 7bd26fc9a111c6af1601ecd2d1b0ab60da32f3f0 /fs/btrfs/super.c | |
parent | 67175b855bfd6ed95ffeff95532173c07de6432d (diff) | |
parent | 96bdc7dc61fb1b1e8e858dafb13abee8482ba064 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (62 commits)
Btrfs: use larger system chunks
Btrfs: add a delalloc mutex to inodes for delalloc reservations
Btrfs: space leak tracepoints
Btrfs: protect orphan block rsv with spin_lock
Btrfs: add allocator tracepoints
Btrfs: don't call btrfs_throttle in file write
Btrfs: release space on error in page_mkwrite
Btrfs: fix btrfsck error 400 when truncating a compressed
Btrfs: do not use btrfs_end_transaction_throttle everywhere
Btrfs: add balance progress reporting
Btrfs: allow for resuming restriper after it was paused
Btrfs: allow for canceling restriper
Btrfs: allow for pausing restriper
Btrfs: add skip_balance mount option
Btrfs: recover balance on mount
Btrfs: save balance parameters to disk
Btrfs: soft profile changing mode (aka soft convert)
Btrfs: implement online profile changing
Btrfs: do not reduce profile in do_chunk_alloc()
Btrfs: virtual address space subset filter
...
Fix up trivial conflict in fs/btrfs/ioctl.c due to the use of the new
mnt_drop_write_file() helper.
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index ae488aa1966a..8ffaaa8e3df8 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -163,8 +163,11 @@ enum { | |||
163 | Opt_compress_type, Opt_compress_force, Opt_compress_force_type, | 163 | Opt_compress_type, Opt_compress_force, Opt_compress_force_type, |
164 | Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, | 164 | Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, |
165 | Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed, | 165 | Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed, |
166 | Opt_enospc_debug, Opt_subvolrootid, Opt_defrag, | 166 | Opt_enospc_debug, Opt_subvolrootid, Opt_defrag, Opt_inode_cache, |
167 | Opt_inode_cache, Opt_no_space_cache, Opt_recovery, Opt_err, | 167 | Opt_no_space_cache, Opt_recovery, Opt_skip_balance, |
168 | Opt_check_integrity, Opt_check_integrity_including_extent_data, | ||
169 | Opt_check_integrity_print_mask, | ||
170 | Opt_err, | ||
168 | }; | 171 | }; |
169 | 172 | ||
170 | static match_table_t tokens = { | 173 | static match_table_t tokens = { |
@@ -199,6 +202,10 @@ static match_table_t tokens = { | |||
199 | {Opt_inode_cache, "inode_cache"}, | 202 | {Opt_inode_cache, "inode_cache"}, |
200 | {Opt_no_space_cache, "nospace_cache"}, | 203 | {Opt_no_space_cache, "nospace_cache"}, |
201 | {Opt_recovery, "recovery"}, | 204 | {Opt_recovery, "recovery"}, |
205 | {Opt_skip_balance, "skip_balance"}, | ||
206 | {Opt_check_integrity, "check_int"}, | ||
207 | {Opt_check_integrity_including_extent_data, "check_int_data"}, | ||
208 | {Opt_check_integrity_print_mask, "check_int_print_mask=%d"}, | ||
202 | {Opt_err, NULL}, | 209 | {Opt_err, NULL}, |
203 | }; | 210 | }; |
204 | 211 | ||
@@ -397,6 +404,40 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
397 | printk(KERN_INFO "btrfs: enabling auto recovery"); | 404 | printk(KERN_INFO "btrfs: enabling auto recovery"); |
398 | btrfs_set_opt(info->mount_opt, RECOVERY); | 405 | btrfs_set_opt(info->mount_opt, RECOVERY); |
399 | break; | 406 | break; |
407 | case Opt_skip_balance: | ||
408 | btrfs_set_opt(info->mount_opt, SKIP_BALANCE); | ||
409 | break; | ||
410 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY | ||
411 | case Opt_check_integrity_including_extent_data: | ||
412 | printk(KERN_INFO "btrfs: enabling check integrity" | ||
413 | " including extent data\n"); | ||
414 | btrfs_set_opt(info->mount_opt, | ||
415 | CHECK_INTEGRITY_INCLUDING_EXTENT_DATA); | ||
416 | btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY); | ||
417 | break; | ||
418 | case Opt_check_integrity: | ||
419 | printk(KERN_INFO "btrfs: enabling check integrity\n"); | ||
420 | btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY); | ||
421 | break; | ||
422 | case Opt_check_integrity_print_mask: | ||
423 | intarg = 0; | ||
424 | match_int(&args[0], &intarg); | ||
425 | if (intarg) { | ||
426 | info->check_integrity_print_mask = intarg; | ||
427 | printk(KERN_INFO "btrfs:" | ||
428 | " check_integrity_print_mask 0x%x\n", | ||
429 | info->check_integrity_print_mask); | ||
430 | } | ||
431 | break; | ||
432 | #else | ||
433 | case Opt_check_integrity_including_extent_data: | ||
434 | case Opt_check_integrity: | ||
435 | case Opt_check_integrity_print_mask: | ||
436 | printk(KERN_ERR "btrfs: support for check_integrity*" | ||
437 | " not compiled in!\n"); | ||
438 | ret = -EINVAL; | ||
439 | goto out; | ||
440 | #endif | ||
400 | case Opt_err: | 441 | case Opt_err: |
401 | printk(KERN_INFO "btrfs: unrecognized mount option " | 442 | printk(KERN_INFO "btrfs: unrecognized mount option " |
402 | "'%s'\n", p); | 443 | "'%s'\n", p); |
@@ -722,6 +763,8 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry) | |||
722 | seq_puts(seq, ",autodefrag"); | 763 | seq_puts(seq, ",autodefrag"); |
723 | if (btrfs_test_opt(root, INODE_MAP_CACHE)) | 764 | if (btrfs_test_opt(root, INODE_MAP_CACHE)) |
724 | seq_puts(seq, ",inode_cache"); | 765 | seq_puts(seq, ",inode_cache"); |
766 | if (btrfs_test_opt(root, SKIP_BALANCE)) | ||
767 | seq_puts(seq, ",skip_balance"); | ||
725 | return 0; | 768 | return 0; |
726 | } | 769 | } |
727 | 770 | ||