From: Mike Snitzer <snitzer@redhat.com>
To: Mike Anderson <andmike@linux.vnet.ibm.com>
Cc: device-mapper development <dm-devel@redhat.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] dm: Add feature flags to dm-mpath
Date: Wed, 5 May 2010 16:01:28 -0400 [thread overview]
Message-ID: <20100505200128.GA19763@redhat.com> (raw)
In-Reply-To: <1272945691-31649-2-git-send-email-andmike@linux.vnet.ibm.com>
On Tue, May 04 2010 at 12:01am -0400,
Mike Anderson <andmike@linux.vnet.ibm.com> wrote:
> Add a feature flag attribute to the multipath structure.
>
> Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
> ---
> drivers/md/dm-mpath.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 826bce7..4200d03 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -82,6 +82,7 @@ struct multipath {
> unsigned saved_queue_if_no_path;/* Saved state during suspension */
> unsigned pg_init_retries; /* Number of times to retry pg_init */
> unsigned pg_init_count; /* Number of times pg_init called */
> + unsigned long features;
Why not use uint64_t?
> struct work_struct process_queued_ios;
> struct list_head queued_ios;
> @@ -118,6 +119,15 @@ static void trigger_event(struct work_struct *work);
> static void activate_path(struct work_struct *work);
> static void deactivate_path(struct work_struct *work);
>
> +static int multipath_test_feature(struct multipath *m, unsigned feature)
> +{
> + return test_bit(feature, &m->features);
> +}
> +
> +static void multipath_set_feature(struct multipath *m, unsigned feature)
> +{
> + set_bit(feature, &m->features);
> +}
You're using 'unsigned long' for features yet these wrapper functions
take 'unsigned'. unsigned allows you to use {test,set}_bit but in the
end we have fewer flags to work with...
Granted you're introducing the very first flag but... ;)
next prev parent reply other threads:[~2010-05-05 20:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 4:01 [PATCH 0/2] dm: Add no_abort_q feature flag to dm-mpath Mike Anderson
2010-05-04 4:01 ` [PATCH 1/2] dm: Add feature flags " Mike Anderson
2010-05-05 20:01 ` Mike Snitzer [this message]
2010-05-05 23:04 ` [dm-devel] " Mike Anderson
2010-05-04 4:01 ` [PATCH 2/2] dm: Add feature flag to control call to blk_abort_queue Mike Anderson
2010-05-05 23:19 ` [PATCH 0/2] dm: Add no_abort_q feature flag to dm-mpath Moger, Babu
2010-05-06 1:39 ` Mike Anderson
2010-05-06 14:38 ` Moger, Babu
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=20100505200128.GA19763@redhat.com \
--to=snitzer@redhat.com \
--cc=andmike@linux.vnet.ibm.com \
--cc=dm-devel@redhat.com \
--cc=linux-scsi@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 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.