diff options
author | Christoph Hellwig <hch@lst.de> | 2017-04-05 13:21:03 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-08 13:25:38 -0400 |
commit | 3deff1a70d5901342f460f8cc36e5d0c5d51c319 (patch) | |
tree | a74cc58c2a3105a9505028c87f8991378979e33c /drivers/md/md.h | |
parent | 02d261034f1c90ac8b052406bd7b18d2564b0b3c (diff) |
md: support REQ_OP_WRITE_ZEROES
Copy & paste from the REQ_OP_WRITE_SAME code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index dde8ecb760c8..1e76d64ce180 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -709,4 +709,11 @@ static inline void mddev_check_writesame(struct mddev *mddev, struct bio *bio) | |||
709 | !bdev_get_queue(bio->bi_bdev)->limits.max_write_same_sectors) | 709 | !bdev_get_queue(bio->bi_bdev)->limits.max_write_same_sectors) |
710 | mddev->queue->limits.max_write_same_sectors = 0; | 710 | mddev->queue->limits.max_write_same_sectors = 0; |
711 | } | 711 | } |
712 | |||
713 | static inline void mddev_check_write_zeroes(struct mddev *mddev, struct bio *bio) | ||
714 | { | ||
715 | if (bio_op(bio) == REQ_OP_WRITE_ZEROES && | ||
716 | !bdev_get_queue(bio->bi_bdev)->limits.max_write_zeroes_sectors) | ||
717 | mddev->queue->limits.max_write_zeroes_sectors = 0; | ||
718 | } | ||
712 | #endif /* _MD_MD_H */ | 719 | #endif /* _MD_MD_H */ |