diff options
author | Christoph Hellwig <hch@lst.de> | 2017-04-05 19:21:23 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-08 19:25:38 +0200 |
commit | 48920ff2a5a940cd07d12cc79e4a2c75f1185aee (patch) | |
tree | 0505a85fce20a0d34c5d4bbc71ba8771a037e209 /block/blk-lib.c | |
parent | drbd: implement REQ_OP_WRITE_ZEROES (diff) | |
download | linux-48920ff2a5a940cd07d12cc79e4a2c75f1185aee.tar.xz linux-48920ff2a5a940cd07d12cc79e4a2c75f1185aee.zip |
block: remove the discard_zeroes_data flag
Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can
kill this hack.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r-- | block/blk-lib.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c index b0c6c4bcf441..e8caecd71688 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -37,17 +37,12 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, return -ENXIO; if (flags & BLKDEV_DISCARD_SECURE) { - if (flags & BLKDEV_DISCARD_ZERO) - return -EOPNOTSUPP; if (!blk_queue_secure_erase(q)) return -EOPNOTSUPP; op = REQ_OP_SECURE_ERASE; } else { if (!blk_queue_discard(q)) return -EOPNOTSUPP; - if ((flags & BLKDEV_DISCARD_ZERO) && - !q->limits.discard_zeroes_data) - return -EOPNOTSUPP; op = REQ_OP_DISCARD; } @@ -126,7 +121,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector, &bio); if (!ret && bio) { ret = submit_bio_wait(bio); - if (ret == -EOPNOTSUPP && !(flags & BLKDEV_DISCARD_ZERO)) + if (ret == -EOPNOTSUPP) ret = 0; bio_put(bio); } |