• Lars Ellenberg's avatar
    drbd: fix queue limit setup for discard · 088b7052
    Lars Ellenberg authored
    We cannot possibly support SECDISCARD, even if all backend devices would
    support it: if our peer is currently unreachable, some instance of the
    data may obviously still be recoverable.
    
    We did not set discard_granularity at all.  We don't really care (yet),
    we only pass them on, so for now, set our granularity to one sector.
    blkdev_stack_limits() takes care of the rest.
    
    If we decide we cannot support discards,
    not only clear the (not user visible) QUEUE_FLAG_DISCARD,
    but set both (user visible) discard_granularity and max_discard_sectors
    to zero, to avoid confusion with e.g. lsblk -D.
    Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    088b7052
drbd_nl.c 138 KB