diff options
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 2a514036a83d..42f8398181a8 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -710,4 +710,11 @@ static inline void mddev_clear_unsupported_flags(struct mddev *mddev, { mddev->flags &= ~unsupported_flags; } + +static inline void mddev_check_writesame(struct mddev *mddev, struct bio *bio) +{ + if (bio_op(bio) == REQ_OP_WRITE_SAME && + !bdev_get_queue(bio->bi_bdev)->limits.max_write_same_sectors) + mddev->queue->limits.max_write_same_sectors = 0; +} #endif /* _MD_MD_H */ |