drbd: disable discard support if granularity > max
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 9 Nov 2022 13:34:52 +0000 (14:34 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Nov 2022 19:40:36 +0000 (12:40 -0700)
commit21b87a7d7564751590e3a38dfb243f9a0bbedbd2
treeb6e3df2ccc8fc479cfaa30debbc7f72074323f7f
parent258bea6388ac93f34561fd91064232d14e174bff
drbd: disable discard support if granularity > max

The discard_granularity describes the minimum unit of a discard.
If that is larger than the maximal discard size, we need to disable
discards completely.

Reviewed-by: Joel Colledge <joel.colledge@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20221109133453.51652-3-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_nl.c