All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian King <brking@us.ibm.com>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: linux-scsi@vger.kernel.org, linux-hotplug-devel@lists.sourceforge.net
Subject: Re: [RFC][PATCH 2.6.11-rc2] Linux SCSI hotplug infrastructure
Date: Mon, 07 Feb 2005 19:22:29 +0000	[thread overview]
Message-ID: <4207BFF5.4000404@us.ibm.com> (raw)
In-Reply-To: <20050207182753.GA16526@lists.us.dell.com>

Matt Domsch wrote:
> Below is a patch to add some hotplug infrastructure to the Linux SCSI
> subsystem.
> 
> New files:
> include/scsi/scsi_hotplug.h
> drivers/scsi/scsi_hotplug.c
> implements a new exported function:
> 
> extern int scsi_topology_hctl_action(struct Scsi_Host *shost, unsigned int channel,
> 			      unsigned int id, unsigned int lun, enum scsi_topology_action action);
> 
> which invokes kobject_hotplug() on a temporary "scsi_topology"
> device.  This device represents a target that exists on a topology
> (i.e. was just inserted into a hot plug enclosure, or was just created
> by a RAID controller management application) but is not yet hooked
> into the kernel.
> 
> 
> In addition, two more infrastructure pieces are necessary:
> udev-050-scsi_topology.patch - adds the subsystem name "scsi_topology"
> to the list of devices *not* to wait for the creation of files in
> sysfs for - scsi_topology devices aren't to be registered in sysfs.
> 
> /etc/hotplug/scsi_topology.agent
>  handles the hotplug call, and invokes /sys/class/scsi_host/hostX/scan
>  and /sys/class/scsi_device/H:C:T:L:/device/delete as appropriate.
> 
> 
> The flow is as follows:
> 
> # echo "2" > /sys/class/scsi_host/host2/logical_drive_created
> (to be done by a management application that knows it just created
> logical drive #2 on the controller)
> 
> megaraid_mbox.c sysfs method converts logical drive number to HCTL
> value, calls scsi_topology_hctl_action().
> 
> scsi_topology_hctl_action() invokes kobject_hotplug() with a
> scsi_topology subsystem device.
> 
> kobject_hotplug() calls /sbin/hotplug or /sbin/udevsend (more likely
> the latter), which invokes /etc/hotplug/scsi_topology.agent with the
> ACTION={add,remove}.
> 
> scsi_topology.agent invokes /sys/class/scsi_host/hostX/scan or
>  /sys/class/scsi_device/H:C:T:L:/device/delete as appropriate.
> 
> From this point, we're back into known territory, with the device
> being made known, or deleted from, the kernel's view.
> 
> Thoughts?

Just curious why the following flow would not work/be preferred:

1. echo "2" > /sys/class/scsi_host/host2/logical_drive_created
2. megaraid_mbox.c sysfs method converts logical drive number to HCTL 
value, calls scsi_add_device.
3. scsi_add_device works as it does today and generates hotplug events

-Brian

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

WARNING: multiple messages have this Message-ID (diff)
From: Brian King <brking@us.ibm.com>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: linux-scsi@vger.kernel.org, linux-hotplug-devel@lists.sourceforge.net
Subject: Re: [RFC][PATCH 2.6.11-rc2] Linux SCSI hotplug infrastructure
Date: Mon, 07 Feb 2005 13:22:29 -0600	[thread overview]
Message-ID: <4207BFF5.4000404@us.ibm.com> (raw)
In-Reply-To: <20050207182753.GA16526@lists.us.dell.com>

Matt Domsch wrote:
> Below is a patch to add some hotplug infrastructure to the Linux SCSI
> subsystem.
> 
> New files:
> include/scsi/scsi_hotplug.h
> drivers/scsi/scsi_hotplug.c
> implements a new exported function:
> 
> extern int scsi_topology_hctl_action(struct Scsi_Host *shost, unsigned int channel,
> 			      unsigned int id, unsigned int lun, enum scsi_topology_action action);
> 
> which invokes kobject_hotplug() on a temporary "scsi_topology"
> device.  This device represents a target that exists on a topology
> (i.e. was just inserted into a hot plug enclosure, or was just created
> by a RAID controller management application) but is not yet hooked
> into the kernel.
> 
> 
> In addition, two more infrastructure pieces are necessary:
> udev-050-scsi_topology.patch - adds the subsystem name "scsi_topology"
> to the list of devices *not* to wait for the creation of files in
> sysfs for - scsi_topology devices aren't to be registered in sysfs.
> 
> /etc/hotplug/scsi_topology.agent
>  handles the hotplug call, and invokes /sys/class/scsi_host/hostX/scan
>  and /sys/class/scsi_device/H:C:T:L:/device/delete as appropriate.
> 
> 
> The flow is as follows:
> 
> # echo "2" > /sys/class/scsi_host/host2/logical_drive_created
> (to be done by a management application that knows it just created
> logical drive #2 on the controller)
> 
> megaraid_mbox.c sysfs method converts logical drive number to HCTL
> value, calls scsi_topology_hctl_action().
> 
> scsi_topology_hctl_action() invokes kobject_hotplug() with a
> scsi_topology subsystem device.
> 
> kobject_hotplug() calls /sbin/hotplug or /sbin/udevsend (more likely
> the latter), which invokes /etc/hotplug/scsi_topology.agent with the
> ACTION={add,remove}.
> 
> scsi_topology.agent invokes /sys/class/scsi_host/hostX/scan or
>  /sys/class/scsi_device/H:C:T:L:/device/delete as appropriate.
> 
> From this point, we're back into known territory, with the device
> being made known, or deleted from, the kernel's view.
> 
> Thoughts?

Just curious why the following flow would not work/be preferred:

1. echo "2" > /sys/class/scsi_host/host2/logical_drive_created
2. megaraid_mbox.c sysfs method converts logical drive number to HCTL 
value, calls scsi_add_device.
3. scsi_add_device works as it does today and generates hotplug events

-Brian

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  parent reply	other threads:[~2005-02-07 19:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07 18:27 [RFC][PATCH 2.6.11-rc2] Linux SCSI hotplug infrastructure Matt Domsch
2005-02-07 18:27 ` Matt Domsch
2005-02-07 18:29 ` Matt Domsch
2005-02-07 18:29   ` Matt Domsch
2005-02-07 18:29 ` Matt Domsch
2005-02-07 18:29   ` Matt Domsch
2005-02-07 18:30 ` Matt Domsch
2005-02-07 18:30   ` Matt Domsch
2005-02-07 19:22 ` Brian King [this message]
2005-02-07 19:22   ` Brian King
2005-02-07 19:40   ` Matt Domsch
2005-02-07 19:40     ` Matt Domsch
2005-02-08 23:19 ` Matt Domsch
2005-02-08 23:19   ` Matt Domsch
2005-02-08 23:22   ` Matt Domsch
2005-02-08 23:23   ` Matt Domsch
  -- strict thread matches above, loose matches on Subject: below --
2005-04-14 18:24 Matt Domsch
2005-04-14 19:00 ` Christoph Hellwig

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=4207BFF5.4000404@us.ibm.com \
    --to=brking@us.ibm.com \
    --cc=Matt_Domsch@dell.com \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    --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.