summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2017-11-02 01:05:11 +0100
committerIlya Dryomov <idryomov@gmail.com>2017-11-13 12:12:44 +0100
commit7c084289795bc0f3b9ab315ac3c8d269dd4d0215 (patch)
treedf3f0656e703f068d48684725a705bba434ddae9 /drivers/block
parentec1dff25b0a012711e10290039fbc8e1c5dd69fb (diff)
downloadblackbird-op-linux-7c084289795bc0f3b9ab315ac3c8d269dd4d0215.tar.gz
blackbird-op-linux-7c084289795bc0f3b9ab315ac3c8d269dd4d0215.zip
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>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 53b1ced21a13..8c132a7fbd2c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4390,7 +4390,6 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
/* enable the discard support */
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
q->limits.discard_granularity = segment_size;
- q->limits.discard_alignment = segment_size;
blk_queue_max_discard_sectors(q, segment_size / SECTOR_SIZE);
blk_queue_max_write_zeroes_sectors(q, segment_size / SECTOR_SIZE);
OpenPOWER on IntegriCloud