From: Dave Chinner <david@fromorbit.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Lukas Czerner <lczerner@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Monakhov <dmonakhov@openvz.org>,
Jens Axboe <jaxboe@fusionio.com>
Subject: Re: [PATCH 3/3] blkdev: honor discard_granularity in blkdev_issue_discard()
Date: Tue, 3 May 2011 09:21:21 +1000 [thread overview]
Message-ID: <20110502232121.GD2978@dastard> (raw)
In-Reply-To: <yq17ha94175.fsf@sermon.lab.mkp.net>
On Mon, May 02, 2011 at 10:38:38AM -0400, Martin K. Petersen wrote:
> >>>>> "Lukas" == Lukas Czerner <lczerner@redhat.com> writes:
>
> Lukas> As Jeff Moyer pointed out we do not honor discard granularity
> Lukas> while submitting REQ_DISCARD bios of size smaller than
> Lukas> max_discard_sectors. That fact might have unwanted consequences
> Lukas> of device ignoring the request, or even worse if device firmware
> Lukas> is buggy.
>
> We've discussed this before and the consensus was not to do it. The
> granularity is a hint, not a hard limit like max_discard_sectors.
>
> We want the reporting to be comprehensive throughout the block layer. If
> we start aligning to the granularity at the top we lose information for
> stacked devices below with a finer granularity.
>
> So if we were to align to the granularity we'd want to do it at the
> bottom of the stack when we issue the command to the device. We've had a
> few proposed patches to did that but so far we've only found one device
> where it made a difference. And that case didn't justify adding a quirk.
Adding this comment to the code to explain why we don't enforce the
granularity would be a good idea, yes?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2011-05-02 23:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 14:17 [PATCH 1/3] blkdev: Submit discard bio in batches in blkdev_issue_discard() Lukas Czerner
2011-05-02 14:17 ` [PATCH 2/3] blkdev: Simple cleanup in blkdev_issue_zeroout() Lukas Czerner
2011-05-02 14:17 ` [PATCH 3/3] blkdev: honor discard_granularity in blkdev_issue_discard() Lukas Czerner
2011-05-02 14:38 ` Martin K. Petersen
2011-05-02 16:10 ` Jeff Moyer
2011-05-02 17:07 ` Martin K. Petersen
2011-05-02 23:21 ` Dave Chinner [this message]
2011-05-02 16:23 ` [PATCH 1/3] blkdev: Submit discard bio in batches " Jens Axboe
2011-05-03 9:30 ` Lukas Czerner
2011-05-03 9:57 ` Christoph Hellwig
2011-05-07 1:23 ` Jens Axboe
2011-05-05 15:20 ` Lukas Czerner
2011-05-07 1:24 ` Jens Axboe
2011-05-09 14:30 ` Christoph Hellwig
2011-05-05 15:12 ` [PATCH] blkdev: Do not return -EOPNOTSUPP if discard is supported Lukas Czerner
2011-05-07 1:30 ` Jens Axboe
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=20110502232121.GD2978@dastard \
--to=david@fromorbit.com \
--cc=dmonakhov@openvz.org \
--cc=jaxboe@fusionio.com \
--cc=lczerner@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).