From: David Disseldorp <ddiss@suse.de>
To: ceph-devel@vger.kernel.org
Cc: Mike Christie <mchristi@redhat.com>,
Ilya Dryomov <idryomov@gmail.com>,
David Disseldorp <ddiss@suse.de>
Subject: [PATCH v2] rbd: set discard alignment to zero
Date: Thu, 2 Nov 2017 01:05:11 +0100 [thread overview]
Message-ID: <20171102000511.29106-1-ddiss@suse.de> (raw)
In-Reply-To: <20171102004338.39d87dea@suse.de>
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>
---
drivers/block/rbd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index b640ad8a6d20..016542c75e1f 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4423,7 +4423,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);
--
2.13.6
next prev parent reply other threads:[~2017-11-02 0:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 12:24 [PATCH] rbd: set discard alignment to zero David Disseldorp
2017-11-01 17:14 ` Ilya Dryomov
2017-11-01 23:43 ` David Disseldorp
2017-11-02 0:05 ` David Disseldorp [this message]
2017-11-02 8:53 ` [PATCH v2] " Ilya Dryomov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171102000511.29106-1-ddiss@suse.de \
--to=ddiss@suse.de \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=mchristi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.