• David Disseldorp's avatar
    rbd: set discard_alignment to zero · 7c084289
    David Disseldorp authored
    RBD devices are currently incorrectly initialised with the block queue
    discard_alignment set to the underlying RADOS object size.
    
    As per Documentation/ABI/testing/sysfs-block:
      The discard_alignment parameter indicates how many bytes the beginning
      of the device is offset from the internal allocation unit's natural
      alignment.
    
    Correcting the discard_alignment parameter from the RADOS object size to
    zero (the blk_set_default_limits() default) has no effect on how discard
    requests are propagated through the block layer - @alignment in
    __blkdev_issue_discard() remains zero. However, it does fix the UNMAP
    granularity alignment value advertised to SCSI initiators via the Block
    Limits VPD.
    Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
    Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    7c084289
rbd.c 166 KB