diff options
author | Christoph Hellwig <hch@lst.de> | 2015-04-24 15:41:01 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-05-19 11:17:03 -0400 |
commit | b25de9d6da49b1a8760a89672283128aa8c78345 (patch) | |
tree | 446d9186aebfbdb2156e438b6c85d84d44dd51a2 /fs/btrfs/disk-io.c | |
parent | 4ecd4fef3a074c8bb43c391a57742c422469ebbd (diff) |
block: remove BIO_EOPNOTSUPP
Since the big barrier rewrite/removal in 2007 we never fail FLUSH or
FUA requests, which means we can remove the magic BIO_EOPNOTSUPP flag
to help propagating those to the buffer_head layer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 2ef9a4b72d06..e08a926fe12c 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -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); |