mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
45c21793a6
commit
48920ff2a5
23 changed files with 27 additions and 124 deletions
|
@ -339,7 +339,6 @@ struct queue_limits {
|
|||
unsigned char misaligned;
|
||||
unsigned char discard_misaligned;
|
||||
unsigned char cluster;
|
||||
unsigned char discard_zeroes_data;
|
||||
unsigned char raid_partial_stripes_expensive;
|
||||
enum blk_zoned_model zoned;
|
||||
};
|
||||
|
@ -1341,7 +1340,6 @@ extern int blkdev_issue_write_same(struct block_device *bdev, sector_t sector,
|
|||
sector_t nr_sects, gfp_t gfp_mask, struct page *page);
|
||||
|
||||
#define BLKDEV_DISCARD_SECURE (1 << 0) /* issue a secure erase */
|
||||
#define BLKDEV_DISCARD_ZERO (1 << 1) /* must reliably zero data */
|
||||
|
||||
extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
|
||||
|
@ -1541,19 +1539,6 @@ static inline int bdev_discard_alignment(struct block_device *bdev)
|
|||
return q->limits.discard_alignment;
|
||||
}
|
||||
|
||||
static inline unsigned int queue_discard_zeroes_data(struct request_queue *q)
|
||||
{
|
||||
if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline unsigned int bdev_discard_zeroes_data(struct block_device *bdev)
|
||||
{
|
||||
return queue_discard_zeroes_data(bdev_get_queue(bdev));
|
||||
}
|
||||
|
||||
static inline unsigned int bdev_write_same(struct block_device *bdev)
|
||||
{
|
||||
struct request_queue *q = bdev_get_queue(bdev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue