]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
btrfs: delete unused member nobarriers
authorAnand Jain <anand.jain@oracle.com>
Thu, 6 Apr 2017 03:22:52 +0000 (11:22 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 14:12:07 +0000 (16:12 +0200)
The last consumer of nobarriers is removed by the commit [1] and sync
won't fail with EOPNOTSUPP anymore. Thus, now when write cache is write
through it just return success without actually transpiring such a
request to the block device/lun.

[1]
commit b25de9d6da49b1a8760a89672283128aa8c78345
block: remove BIO_EOPNOTSUPP

And, as the device/lun write cache state may change dynamically saving
such as state won't help either. So deleting the member nobarriers.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.h

index a9314fe494c92a3e0902b90bfc230963769fa286..e070e463ad8bbc0c488d361bcf2019935181aa03 100644 (file)
@@ -3521,9 +3521,6 @@ static int write_dev_flush(struct btrfs_device *device, int wait)
        struct bio *bio;
        int ret = 0;
 
-       if (device->nobarriers)
-               return 0;
-
        if (wait) {
                bio = device->flush_bio;
                if (!bio)
index def39b5a8d9ead3328e0437fec3496bafe96a0a6..c7d0fbc915cabdee7cfec437e18f795ace77abbb 100644 (file)
@@ -123,7 +123,6 @@ struct btrfs_device {
        struct list_head resized_list;
 
        /* for sending down flush barriers */
-       int nobarriers;
        struct bio *flush_bio;
        struct completion flush_wait;