mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-19 13:22:03 +00:00
block: add a new BLKDEV_ZERO_NOFALLBACK flag
This avoids fallbacks to explicit zeroing in (__)blkdev_issue_zeroout if the caller doesn't want them. Also clean up the convoluted check for the return condition that this new flag is added to. 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
d928be9f85
commit
cb365b9675
2 changed files with 5 additions and 1 deletions
|
@ -1350,6 +1350,7 @@ extern int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
|
|||
struct bio **biop);
|
||||
|
||||
#define BLKDEV_ZERO_NOUNMAP (1 << 0) /* do not free blocks */
|
||||
#define BLKDEV_ZERO_NOFALLBACK (1 << 1) /* don't write explicit zeroes */
|
||||
|
||||
extern int __blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
|
||||
sector_t nr_sects, gfp_t gfp_mask, struct bio **biop,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue