• Mike Snitzer's avatar
    dm thin: do not expose non-zero discard limits if discards disabled · b60ab990
    Mike Snitzer authored
    Fix issue where the block layer would stack the discard limits of the
    pool's data device even if the "ignore_discard" pool feature was
    specified.
    
    The pool and thin device(s) still had discards disabled because the
    QUEUE_FLAG_DISCARD request_queue flag wasn't set.  But to avoid user
    confusion when "ignore_discard" is used: both the pool device and the
    thin device(s) have zeroes for all discard limits.
    
    Also, always set discard_zeroes_data_unsupported in targets because they
    should never advertise the 'discard_zeroes_data' capability (even if the
    pool's data device supports it).
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    Acked-by: default avatarJoe Thornber <ejt@redhat.com>
    b60ab990
dm-thin.c 74.6 KB