diff options
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); |