From: Milan Broz <mbroz@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH] dm table: simplify discard support processing
Date: Thu, 14 Jul 2011 17:43:47 +0200 [thread overview]
Message-ID: <4E1F0EB3.9010004@redhat.com> (raw)
In-Reply-To: <20110714143037.GA12049@redhat.com>
On 07/14/2011 04:30 PM, Mike Snitzer wrote:
> Remove 'discards_supported' from the dm_table structure. The same
> information can be easily discovered from the table's target(s) in
> dm_table_supports_discards().
>
> Also DMWARN if a target sets 'discards_supported' override but forgets
> to set 'num_discard_requests'.
Why not BUG_ON? It is bug in code on static attribute, isn't? :-)
> @@ -1426,6 +1422,9 @@ bool dm_table_supports_discards(struct dm_table *t)
> while (i < dm_table_get_num_targets(t)) {
> ti = dm_table_get_target(t, i++);
>
> + if (!ti->num_discard_requests)
> + return 0;
> +
> if (ti->discards_supported)
> return 1;
What if next target has ti->num_discard_requests = 0 here?
Shouldn't it loop through the all targets always?
Milan
next prev parent reply other threads:[~2011-07-14 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 14:30 [PATCH] dm table: simplify discard support processing Mike Snitzer
2011-07-14 15:43 ` Milan Broz [this message]
2011-07-14 16:11 ` Mike Snitzer
2011-07-14 17:56 ` [PATCH v2] " Mike Snitzer
2011-07-18 15:10 ` Mike Snitzer
2011-07-21 2:53 ` [PATCH v3] dm table: fix and " 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=4E1F0EB3.9010004@redhat.com \
--to=mbroz@redhat.com \
--cc=dm-devel@redhat.com \
--cc=snitzer@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.