Re: How to add/drop SCSI drives from within the driver?
From: James Bottomley
Date: Wed Dec 15 2004 - 15:29:59 EST
On Wed, 2004-12-15 at 01:24 -0600, Matt Domsch wrote:
> James, I've been thinking about this a little more, and you may be on
> to something here. Let each driver add files as such:
> |-- host0
> | |-- add_logical_drive
> | |-- remove_logical_drive
> | `-- rescan_logical_drive
> Then we can go 2 ways with this.
> 1) driver functions directly call scsi_add_device(),
> scsi_remove_device(), and something for rescan (option 2 handles this
> one cleanly for us). ATM, megaraid_mbox doesn't implement a rescan
> function, so this point may be moot.
> 2) driver functions call a midlayer library function, which invokes
> /sbin/hotplug with appropriate data, and add a new /etc/hotplug.d
> helper app which would then write to these files:
> |-- host0
> | |-- scan
> |-- 0:0:0:0
> | |-- delete
> | |-- rescan
> to do likewise.
I'll buy this (option 2).. it seems like a good way to export the
megaraid specific information and at the same time integrate it more
fully into the evolving hotplug infrastructure.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/