diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
| commit | bb799d3b980eb803ca2da4a4eefbd9308f8d988a (patch) | |
| tree | 69fbe0cd6d47b23a50f5e1d87bf7489532fae149 /fs/btrfs | |
| parent | 919fc6e34831d1c2b58bfb5ae261dc3facc9b269 (diff) | |
| parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
Merge tag 'v3.13-rc4' into core/locking
Merge Linux 3.13-rc4, to refresh this rather old tree with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/btrfs')
| -rw-r--r-- | fs/btrfs/Kconfig | 15 | ||||
| -rw-r--r-- | fs/btrfs/async-thread.c | 1 | ||||
| -rw-r--r-- | fs/btrfs/check-integrity.c | 57 | ||||
| -rw-r--r-- | fs/btrfs/check-integrity.h | 2 | ||||
| -rw-r--r-- | fs/btrfs/ctree.h | 6 | ||||
| -rw-r--r-- | fs/btrfs/dev-replace.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/disk-io.c | 21 | ||||
| -rw-r--r-- | fs/btrfs/extent-tree.c | 22 | ||||
| -rw-r--r-- | fs/btrfs/extent_io.c | 23 | ||||
| -rw-r--r-- | fs/btrfs/inode.c | 6 | ||||
| -rw-r--r-- | fs/btrfs/ioctl.c | 3 | ||||
| -rw-r--r-- | fs/btrfs/ordered-data.c | 3 | ||||
| -rw-r--r-- | fs/btrfs/relocation.c | 81 | ||||
| -rw-r--r-- | fs/btrfs/scrub.c | 39 | ||||
| -rw-r--r-- | fs/btrfs/send.c | 4 | ||||
| -rw-r--r-- | fs/btrfs/super.c | 5 | ||||
| -rw-r--r-- | fs/btrfs/transaction.c | 4 | ||||
| -rw-r--r-- | fs/btrfs/tree-log.c | 5 | ||||
| -rw-r--r-- | fs/btrfs/volumes.c | 2 |
19 files changed, 146 insertions, 155 deletions
diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig index f9d5094e1029..aa976eced2d2 100644 --- a/fs/btrfs/Kconfig +++ b/fs/btrfs/Kconfig | |||
| @@ -9,12 +9,17 @@ config BTRFS_FS | |||
| 9 | select XOR_BLOCKS | 9 | select XOR_BLOCKS |
| 10 | 10 | ||
| 11 | help | 11 | help |
| 12 | Btrfs is a new filesystem with extents, writable snapshotting, | 12 | Btrfs is a general purpose copy-on-write filesystem with extents, |
| 13 | support for multiple devices and many more features. | 13 | writable snapshotting, support for multiple devices and many more |
| 14 | features focused on fault tolerance, repair and easy administration. | ||
| 14 | 15 | ||
| 15 | Btrfs is highly experimental, and THE DISK FORMAT IS NOT YET | 16 | The filesystem disk format is no longer unstable, and it's not |
| 16 | FINALIZED. You should say N here unless you are interested in | 17 | expected to change unless there are strong reasons to do so. If there |
| 17 | testing Btrfs with non-critical data. | 18 | is a format change, file systems with a unchanged format will |
| 19 | continue to be mountable and usable by newer kernels. | ||
| 20 | |||
| 21 | For more information, please see the web pages at | ||
| 22 | http://btrfs.wiki.kernel.org. | ||
| 18 | 23 | ||
| 19 | To compile this file system support as a module, choose M here. The | 24 | To compile this file system support as a module, choose M here. The |
| 20 | module will be called btrfs. | 25 | module will be called btrfs. |
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 8aec751fa464..c1e0b0caf9cc 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
| @@ -495,6 +495,7 @@ static int __btrfs_start_workers(struct btrfs_workers *workers) | |||
| 495 | spin_lock_irq(&workers->lock); | 495 | spin_lock_irq(&workers->lock); |
| 496 | if (workers->stopping) { | 496 | if (workers->stopping) { |
| 497 | spin_unlock_irq(&workers->lock); | 497 | spin_unlock_irq(&workers->lock); |
| 498 | ret = -EINVAL; | ||
| 498 | goto fail_kthread; | 499 | goto fail_kthread; |
| 499 | } | 500 | } |
| 500 | list_add_tail(&worker->worker_list, &workers->idle_list); | 501 | list_add_tail(&worker->worker_list, &workers->idle_list); |
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index e0aab4456974..131d82800b3a 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c | |||
| @@ -77,6 +77,15 @@ | |||
| 77 | * the integrity of (super)-block write requests, do not | 77 | * the integrity of (super)-block write requests, do not |
| 78 | * enable the config option BTRFS_FS_CHECK_INTEGRITY to | 78 | * enable the config option BTRFS_FS_CHECK_INTEGRITY to |
| 79 | * include and compile the integrity check tool. | 79 | * include and compile the integrity check tool. |
| 80 | * | ||
| 81 | * Expect millions of lines of information in the kernel log with an | ||
| 82 | * enabled check_int_print_mask. Therefore set LOG_BUF_SHIFT in the | ||
| 83 | * kernel config to at least 26 (which is 64MB). Usually the value is | ||
| 84 | * limited to 21 (which is 2MB) in init/Kconfig. The file needs to be | ||
| 85 | * changed like this before LOG_BUF_SHIFT can be set to a high value: | ||
| 86 | * config LOG_BUF_SHIFT | ||
| 87 | * int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" | ||
| 88 | * range 12 30 | ||
| 80 | */ | 89 | */ |
| 81 | 90 | ||
| 82 | #include <linux/sched.h> | 91 | #include <linux/sched.h> |
| @@ -124,6 +133,7 @@ | |||
| 124 | #define BTRFSIC_PRINT_MASK_INITIAL_DATABASE 0x00000400 | 133 | #define BTRFSIC_PRINT_MASK_INITIAL_DATABASE 0x00000400 |
| 125 | #define BTRFSIC_PRINT_MASK_NUM_COPIES 0x00000800 | 134 | #define BTRFSIC_PRINT_MASK_NUM_COPIES 0x00000800 |
| 126 | #define BTRFSIC_PRINT_MASK_TREE_WITH_ALL_MIRRORS 0x00001000 | 135 | #define BTRFSIC_PRINT_MASK_TREE_WITH_ALL_MIRRORS 0x00001000 |
| 136 | #define BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH_VERBOSE 0x00002000 | ||
| 127 | 137 | ||
| 128 | struct btrfsic_dev_state; | 138 | struct btrfsic_dev_state; |
| 129 | struct btrfsic_state; | 139 | struct btrfsic_state; |
| @@ -323,7 +333,6 @@ static void btrfsic_release_block_ctx(struct btrfsic_block_data_ctx *block_ctx); | |||
| 323 | static int btrfsic_read_block(struct btrfsic_state *state, | 333 | static int btrfsic_read_block(struct btrfsic_state *state, |
| 324 | struct btrfsic_block_data_ctx *block_ctx); | 334 | struct btrfsic_block_data_ctx *block_ctx); |
| 325 | static void btrfsic_dump_database(struct btrfsic_state *state); | 335 | static void btrfsic_dump_database(struct btrfsic_state *state); |
| 326 | static void btrfsic_complete_bio_end_io(struct bio *bio, int err); | ||
| 327 | static int btrfsic_test_for_metadata(struct btrfsic_state *state, | 336 | static int btrfsic_test_for_metadata(struct btrfsic_state *state, |
| 328 | char **datav, unsigned int num_pages); | 337 | char **datav, unsigned int num_pages); |
| 329 | static void btrfsic_process_written_block(struct btrfsic_dev_state *dev_state, | 338 | static void btrfsic_process_written_block(struct btrfsic_dev_state *dev_state, |
| @@ -1677,7 +1686,6 @@ static int btrfsic_read_block(struct btrfsic_state *state, | |||
| 1677 | for (i = 0; i < num_pages;) { | 1686 | for (i = 0; i < num_pages;) { |
| 1678 | struct bio *bio; | 1687 | struct bio *bio; |
| 1679 | unsigned int j; | 1688 | unsigned int j; |
| 1680 | DECLARE_COMPLETION_ONSTACK(complete); | ||
| 1681 | 1689 | ||
| 1682 | bio = btrfs_io_bio_alloc(GFP_NOFS, num_pages - i); | 1690 | bio = btrfs_io_bio_alloc(GFP_NOFS, num_pages - i); |
| 1683 | if (!bio) { | 1691 | if (!bio) { |
| @@ -1688,8 +1696,6 @@ static int btrfsic_read_block(struct btrfsic_state *state, | |||
| 1688 | } | 1696 | } |
| 1689 | bio->bi_bdev = block_ctx->dev->bdev; | 1697 | bio->bi_bdev = block_ctx->dev->bdev; |
| 1690 | bio->bi_sector = dev_bytenr >> 9; | 1698 | bio->bi_sector = dev_bytenr >> 9; |
| 1691 | bio->bi_end_io = btrfsic_complete_bio_end_io; | ||
| 1692 | bio->bi_private = &complete; | ||
| 1693 | 1699 | ||
| 1694 | for (j = i; j < num_pages; j++) { | 1700 | for (j = i; j < num_pages; j++) { |
| 1695 | ret = bio_add_page(bio, block_ctx->pagev[j], | 1701 | ret = bio_add_page(bio, block_ctx->pagev[j], |
| @@ -1702,12 +1708,7 @@ static int btrfsic_read_block(struct btrfsic_state *state, | |||
| 1702 | "btrfsic: error, failed to add a single page!\n"); | 1708 | "btrfsic: error, failed to add a single page!\n"); |
| 1703 | return -1; | 1709 | return -1; |
| 1704 | } | 1710 | } |
| 1705 | submit_bio(READ, bio); | 1711 | if (submit_bio_wait(READ, bio)) { |
| 1706 | |||
| 1707 | /* this will also unplug the queue */ | ||
| 1708 | wait_for_completion(&complete); | ||
| 1709 | |||
| 1710 | if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) { | ||
| 1711 | printk(KERN_INFO | 1712 | printk(KERN_INFO |
| 1712 | "btrfsic: read error at logical %llu dev %s!\n", | 1713 | "btrfsic: read error at logical %llu dev %s!\n", |
| 1713 | block_ctx->start, block_ctx->dev->name); | 1714 | block_ctx->start, block_ctx->dev->name); |
| @@ -1730,11 +1731,6 @@ static int btrfsic_read_block(struct btrfsic_state *state, | |||
| 1730 | return block_ctx->len; | 1731 | return block_ctx->len; |
| 1731 | } | 1732 | } |
| 1732 | 1733 | ||
| 1733 | static void btrfsic_complete_bio_end_io(struct bio *bio, int err) | ||
| 1734 | { | ||
| 1735 | complete((struct completion *)bio->bi_private); | ||
| 1736 | } | ||
| 1737 | |||
| 1738 | static void btrfsic_dump_database(struct btrfsic_state *state) | 1734 | static void btrfsic_dump_database(struct btrfsic_state *state) |
| 1739 | { | 1735 | { |
| 1740 | struct list_head *elem_all; | 1736 | struct list_head *elem_all; |
| @@ -2998,14 +2994,12 @@ int btrfsic_submit_bh(int rw, struct buffer_head *bh) | |||
| 2998 | return submit_bh(rw, bh); | 2994 | return submit_bh(rw, bh); |
| 2999 | } | 2995 | } |
| 3000 | 2996 | ||
| 3001 | void btrfsic_submit_bio(int rw, struct bio *bio) | 2997 | static void __btrfsic_submit_bio(int rw, struct bio *bio) |
| 3002 | { | 2998 | { |
| 3003 | struct btrfsic_dev_state *dev_state; | 2999 | struct btrfsic_dev_state *dev_state; |
| 3004 | 3000 | ||
| 3005 | if (!btrfsic_is_initialized) { | 3001 | if (!btrfsic_is_initialized) |
| 3006 | submit_bio(rw, bio); | ||
| 3007 | return; | 3002 | return; |
| 3008 | } | ||
| 3009 | 3003 | ||
| 3010 | mutex_lock(&btrfsic_mutex); | 3004 | mutex_lock(&btrfsic_mutex); |
| 3011 | /* since btrfsic_submit_bio() is also called before | 3005 | /* since btrfsic_submit_bio() is also called before |
| @@ -3015,6 +3009,7 @@ void btrfsic_submit_bio(int rw, struct bio *bio) | |||
| 3015 | (rw & WRITE) && NULL != bio->bi_io_vec) { | 3009 | (rw & WRITE) && NULL != bio->bi_io_vec) { |
| 3016 | unsigned int i; | 3010 | unsigned int i; |
