From: Bart Van Assche <bvanassche@acm.org>
To: himanshu.madhani@oracle.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org
Subject: Re: [RFC v1 2/8] scsi: create multipath capable scsi host
Date: Sun, 10 Nov 2024 13:11:17 -0800 [thread overview]
Message-ID: <2799bf7b-2659-4962-9618-559e6f2afe15@acm.org> (raw)
In-Reply-To: <20241109044529.992935-3-himanshu.madhani@oracle.com>
On 11/8/24 8:45 PM, himanshu.madhani@oracle.com wrote:
> #include "scsi_priv.h"
> #include "scsi_logging.h"
> @@ -394,6 +395,14 @@ struct Scsi_Host *scsi_host_alloc(const struct scsi_host_template *sht, int priv
> struct Scsi_Host *shost;
> int index;
>
> +#ifdef CONFIG_SCSI_MULTIPATH
> + struct scsi_mpath *mpath_dev;
> + size_t size = sizeof(*mpath_dev);
> +
> + size += num_possible_nodes() * sizeof(struct mpath_dev *);
> + privsize = privsize + size;
> +#endif
> +
> shost = kzalloc(sizeof(struct Scsi_Host) + privsize, GFP_KERNEL);
> if (!shost)
> return NULL;
> @@ -409,6 +418,9 @@ struct Scsi_Host *scsi_host_alloc(const struct scsi_host_template *sht, int priv
> init_waitqueue_head(&shost->host_wait);
> mutex_init(&shost->scan_mutex);
>
> +#ifdef CONFIG_SCSI_MULTIPATH
> + INIT_LIST_HEAD(&shost->mpath_sdev);
> +#endif
> index = ida_alloc(&host_index_ida, GFP_KERNEL);
> if (index < 0) {
> kfree(shost);
From Documentation/process/4.Coding.rst: "As a general rule, #ifdef use
should be confined to header files whenever possible." Please follow
this advice.
Thanks,
Bart.
next prev parent reply other threads:[~2024-11-10 21:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-09 4:45 [RFC v1 0/8] scsi: Multipath support for scsi disk devices himanshu.madhani
2024-11-09 4:45 ` [RFC v1 1/8] scsi: Add multipath device support himanshu.madhani
2024-11-12 21:09 ` Bart Van Assche
2024-11-13 0:20 ` Himanshu Madhani
2024-11-09 4:45 ` [RFC v1 2/8] scsi: create multipath capable scsi host himanshu.madhani
2024-11-10 21:11 ` Bart Van Assche [this message]
2024-11-09 4:45 ` [RFC v1 3/8] scsi: Add error handling capability for multipath himanshu.madhani
2024-11-09 4:45 ` [RFC v1 4/8] scsi: Complete multipath request himanshu.madhani
2024-11-09 4:45 ` [RFC v1 5/8] scsi: Add scsi multipath sysfs hooks himanshu.madhani
2024-11-09 4:45 ` [RFC v1 6/8] scsi: Add multipath suppport for device handler himanshu.madhani
2024-11-09 4:45 ` [RFC v1 7/8] scsi: Add multipath disk init code for sd driver himanshu.madhani
2024-11-09 4:45 ` [RFC v1 8/8] scsi_debug: Add module parameter for ALUA multipath himanshu.madhani
2024-11-10 21:15 ` [RFC v1 0/8] scsi: Multipath support for scsi disk devices Bart Van Assche
2024-11-12 20:46 ` Himanshu Madhani
2024-11-22 14:27 ` Hannes Reinecke
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=2799bf7b-2659-4962-9618-559e6f2afe15@acm.org \
--to=bvanassche@acm.org \
--cc=himanshu.madhani@oracle.com \
--cc=linux-scsi@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