]> asedeno.scripts.mit.edu Git - linux.git/commit
rbd: set discard_alignment to zero
authorDavid Disseldorp <ddiss@suse.de>
Thu, 2 Nov 2017 00:05:11 +0000 (01:05 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 13 Nov 2017 11:12:44 +0000 (12:12 +0100)
commit7c084289795bc0f3b9ab315ac3c8d269dd4d0215
treedf3f0656e703f068d48684725a705bba434ddae9
parentec1dff25b0a012711e10290039fbc8e1c5dd69fb
rbd: set discard_alignment to zero

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: David Disseldorp <ddiss@suse.de>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c