Skip to content

Commit

Permalink
btrfs: delete unused member nobarriers
Browse files Browse the repository at this point in the history
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 b25de9d
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>
  • Loading branch information
Anand Jain authored and David Sterba committed Apr 18, 2017
1 parent 28d70e2 commit 13e88e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion fs/btrfs/volumes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 13e88e1

Please sign in to comment.