From: Mike Snitzer <snitzer@redhat.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: jaxboe@fusionio.com, msb@chromium.org,
linux-kernel@vger.kernel.org, dm-devel@redhat.com,
"Alasdair G. Kergon" <agk@redhat.com>
Subject: Re: [PATCH 3/3] block: Move discard and secure discard flags to queue limits
Date: Fri, 27 May 2011 09:39:52 -0400 [thread overview]
Message-ID: <20110527133952.GC17219@redhat.com> (raw)
In-Reply-To: <1306464169-4291-4-git-send-email-martin.petersen@oracle.com>
On Thu, May 26 2011 at 10:42pm -0400,
Martin K. Petersen <martin.petersen@oracle.com> wrote:
> Whether a device supports discard is currently stored two places:
> max_discard_sectors in the queue limits and the discard request_queue
> flag. Deprecate the queue flag and always use the topology.
>
> Also move the secure discard flag to the queue limits so it can be
> stacked as well.
>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index 35792bf..b5c6a1b 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -1185,11 +1185,6 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
> */
> q->limits = *limits;
>
> - if (!dm_table_supports_discards(t))
> - queue_flag_clear_unlocked(QUEUE_FLAG_DISCARD, q);
> - else
> - queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
> -
> dm_table_set_integrity(t);
>
> /*
This doesn't go far enough; dm-table.c pays attention to the targets in
a table and their support for discards.
Most targets do support discards (tgt->num_discard_requests > 0). But
if any target doesn't support discards then the entire table doesn't
support them.
In addition, there is patch that Alasdair just merged that allows a
target to short-circuit the normal dm_table_supports_discards() and
always claim support for discards. This is needed for the upcoming DM
thinp target (target, and table, supports discards even if none of the
target's underlying devices do).
This is queued for Alasdair's 2.6.40 pull request to Linus (which should
be happening very soon):
ftp://sources.redhat.com/pub/dm/patches/2.6-unstable/editing/patches/dm-table-allow-targets-to-support-discards-internally.patch
Can we give this patch another cycle (IMHO quite late to crank out DM
changes that don't offer discard support regressions)? I'd have time to
sort out the DM side of things so that it plays nice with what you've
provided.
The previous 2 patches look good to me. But if Jens is to merge those
for the current window that means Alasdair should drop this stop-gap
patch that he queued up:
ftp://sources.redhat.com/pub/dm/patches/2.6-unstable/editing/patches/dm-table-propagate-non-rotational-flag.patch
Thoughts?
Mike
next prev parent reply other threads:[~2011-05-27 13:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 20:50 [PATCH] dm: pass up rotational flag Mandeep Singh Baines
2011-05-26 18:23 ` Mike Snitzer
2011-05-26 18:29 ` Martin K. Petersen
2011-05-26 18:43 ` Mike Snitzer
2011-05-26 18:48 ` Martin K. Petersen
2011-05-26 19:14 ` Jens Axboe
2011-05-27 2:42 ` Martin K. Petersen
2011-05-27 2:42 ` [PATCH 1/3] block: Introduce blk_set_stacking_limits function Martin K. Petersen
2011-05-27 13:03 ` Mike Snitzer
2011-05-27 2:42 ` [PATCH 2/3] block: Move non-rotational flag to queue limits Martin K. Petersen
2011-05-27 13:02 ` Mike Snitzer
2011-05-31 2:19 ` Martin K. Petersen
2011-05-31 12:49 ` Mike Snitzer
2011-05-31 13:14 ` Jens Axboe
2011-05-31 14:28 ` Martin K. Petersen
2011-05-31 14:43 ` Jens Axboe
2011-05-27 2:42 ` [PATCH 3/3] block: Move discard and secure discard flags " Martin K. Petersen
2011-05-27 13:39 ` Mike Snitzer [this message]
2011-05-31 2:22 ` Martin K. Petersen
2011-07-13 15:46 ` Mike Snitzer
2011-05-27 16:20 ` Mandeep Singh Baines
2011-05-26 18:35 ` [PATCH v2] dm: pass up non-rotational flag Mike Snitzer
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=20110527133952.GC17219@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=msb@chromium.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