From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: jiayingz@google.com (Jiaying Zhang)
Cc: hch@infradead.org, jens.axboe@oracle.com,
linux-kernel@vger.kernel.org, mrubin@google.com
Subject: Re: [PATCH, RFC] addjust discard request to be aligned with hwsect size to support SSDs with larger sector size
Date: Mon, 17 May 2010 14:57:22 -0400 [thread overview]
Message-ID: <yq1pr0u8igd.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20100513051953.532821BC316@ruihe.smo.corp.google.com> (Jiaying Zhang's message of "Wed, 12 May 2010 22:19:53 -0700 (PDT)")
>>>>> "Jiaying" == Jiaying Zhang <jiayingz@google.com> writes:
Jiaying,
Jiaying> The currect blkdev_issue_discard() function assumes 512 sector
Jiaying> size.
All of the block layer works on 512-byte sector units. We don't
generally convert to logical blocks until we're in the disk driver.
Jiaying> We have seen some problem when using discard on a SSD that has
Jiaying> larger sector size. The following patch adjusts the starting
Jiaying> address and size of a discard request to be aligned with hwsect
Jiaying> size.
Jiaying> + int hwsect_shift =
Jiaying> blksize_bits(bdev_logical_block_size(bdev)) - 9;
Let's stop using the term hardware sector size. It's an anachronism.
I guess I could understand if you aligned to the physical block size.
But the logical doesn't make much sense to me.
What is your logical block size? Right now we only handle 512 bytes and
4KB in the discard path.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2010-05-17 18:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 5:19 Jiaying Zhang
2010-05-16 13:38 ` Christoph Hellwig
2010-05-17 19:27 ` Jiaying Zhang
2010-05-17 18:57 ` Martin K. Petersen [this message]
2010-05-17 19:44 ` Jiaying Zhang
2010-05-17 20:00 ` Martin K. Petersen
2010-05-18 0:57 ` Jiaying Zhang
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=yq1pr0u8igd.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=hch@infradead.org \
--cc=jens.axboe@oracle.com \
--cc=jiayingz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrubin@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®