linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: 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: Mon, 02 May 2011 10:38:38 -0400	[thread overview]
Message-ID: <yq17ha94175.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <1304345841-20063-3-git-send-email-lczerner@redhat.com> (Lukas Czerner's message of "Mon, 2 May 2011 16:17:21 +0200")

>>>>> "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.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2011-05-02 14:38 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 [this message]
2011-05-02 16:10     ` Jeff Moyer
2011-05-02 17:07       ` Martin K. Petersen
2011-05-02 23:21     ` Dave Chinner
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=yq17ha94175.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.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 \
    /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).