diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 17:29:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 17:29:53 -0400 |
commit | bfffa1cc9db8a950dd4b1a09999f8a20e69a6652 (patch) | |
tree | 01b046072ca9105b7852f790762f7b00b72e6ff7 /fs/btrfs/disk-io.c | |
parent | cc8a0a943948d1b1bc803b37486831af7b04dd38 (diff) | |
parent | ae994ea972473c0ace9d55f718b60f0727af1381 (diff) |
Merge branch 'for-4.2/core' of git://git.kernel.dk/linux-block
Pull core block IO update from Jens Axboe:
"Nothing really major in here, mostly a collection of smaller
optimizations and cleanups, mixed with various fixes. In more detail,
this contains:
- Addition of policy specific data to blkcg for block cgroups. From
Arianna Avanzini.
- Various cleanups around command types from Christoph.
- Cleanup of the suspend block I/O path from Christoph.
- Plugging updates from Shaohua and Jeff Moyer, for blk-mq.
- Eliminating atomic inc/dec of both remaining IO count and reference
count in a bio. From me.
- Fixes for SG gap and chunk size support for data-less (discards)
IO, so we can merge these better. From me.
- Small restructuring of blk-mq shared tag support, freeing drivers
from iterating hardware queues. From Keith Busch.
- A few cfq-iosched tweaks, from Tahsin Erdogan and me. Makes the
IOPS mode the default for non-rotational storage"
* 'for-4.2/core' of git://git.kernel.dk/linux-block: (35 commits)
cfq-iosched: fix other locations where blkcg_to_cfqgd() can return NULL
cfq-iosched: fix sysfs oops when attempting to read unconfigured weights
cfq-iosched: move group scheduling functions under ifdef
cfq-iosched: fix the setting of IOPS mode on SSDs
blktrace: Add blktrace.c to BLOCK LAYER in MAINTAINERS file
block, cgroup: implement policy-specific per-blkcg data
block: Make CFQ default to IOPS mode on SSDs
block: add blk_set_queue_dying() to blkdev.h
blk-mq: Shared tag enhancements
block: don't honor chunk sizes for data-less IO
block: only honor SG gap prevention for merges that contain data
block: fix returnvar.cocci warnings
block, dm: don't copy bios for request clones
block: remove management of bi_remaining when restoring original bi_end_io
block: replace trylock with mutex_lock in blkdev_reread_part()
block: export blkdev_reread_part() and __blkdev_reread_part()
suspend: simplify block I/O handling
block: collapse bio bit space
block: remove unused BIO_RW_BLOCK and BIO_EOF flags
block: remove BIO_EOPNOTSUPP
...
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 2ef9a4b72d06..0bccf18dc1dc 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1745,7 +1745,7 @@ static void end_workqueue_fn(struct btrfs_work *work) | |||
1745 | bio->bi_private = end_io_wq->private; | 1745 | bio->bi_private = end_io_wq->private; |
1746 | bio->bi_end_io = end_io_wq->end_io; | 1746 | bio->bi_end_io = end_io_wq->end_io; |
1747 | kmem_cache_free(btrfs_end_io_wq_cache, end_io_wq); | 1747 | kmem_cache_free(btrfs_end_io_wq_cache, end_io_wq); |
1748 | bio_endio_nodec(bio, error); | 1748 | bio_endio(bio, error); |
1749 | } | 1749 | } |
1750 | 1750 | ||
1751 | static int cleaner_kthread(void *arg) | 1751 | static int cleaner_kthread(void *arg) |
@@ -3269,11 +3269,8 @@ static int write_dev_supers(struct btrfs_device *device, | |||
3269 | */ | 3269 | */ |
3270 | static void btrfs_end_empty_barrier(struct bio *bio, int err) | 3270 | static void btrfs_end_empty_barrier(struct bio *bio, int err) |
3271 | { | 3271 | { |
3272 | if (err) { | 3272 | if (err) |
3273 | if (err == -EOPNOTSUPP) | ||
3274 | set_bit(BIO_EOPNOTSUPP, &bio->bi_flags); | ||
3275 | clear_bit(BIO_UPTODATE, &bio->bi_flags); | 3273 | clear_bit(BIO_UPTODATE, &bio->bi_flags); |
3276 | } | ||
3277 | if (bio->bi_private) | 3274 | if (bio->bi_private) |
3278 | complete(bio->bi_private); | 3275 | complete(bio->bi_private); |
3279 | bio_put(bio); | 3276 | bio_put(bio); |
@@ -3301,11 +3298,7 @@ static int write_dev_flush(struct btrfs_device *device, int wait) | |||
3301 | 3298 | ||
3302 | wait_for_completion(&device->flush_wait); | 3299 | wait_for_completion(&device->flush_wait); |
3303 | 3300 | ||
3304 | if (bio_flagged(bio, BIO_EOPNOTSUPP)) { | 3301 | if (!bio_flagged(bio, BIO_UPTODATE)) { |
3305 | printk_in_rcu("BTRFS: disabling barriers on dev %s\n", | ||
3306 | rcu_str_deref(device->name)); | ||
3307 | device->nobarriers = 1; | ||
3308 | } else if (!bio_flagged(bio, BIO_UPTODATE)) { | ||
3309 | ret = -EIO; | 3302 | ret = -EIO; |
3310 | btrfs_dev_stat_inc_and_print(device, | 3303 | btrfs_dev_stat_inc_and_print(device, |
3311 | BTRFS_DEV_STAT_FLUSH_ERRS); | 3304 | BTRFS_DEV_STAT_FLUSH_ERRS); |