From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 02 Dec 2003 18:00:41 +0000 Subject: Re: class_device/udev support for tapes? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Dec 02, 2003 at 06:35:18PM +0100, Arnd Bergmann wrote: > Has anyone come up with a solution for using udev for tape devices? The scsi people need to add support for this into the st driver. They also need to add it to their sg driver for scsi generic devices. They know about this, and hopefully are working on it... > Unlike block devices, there is no master device with anything > similar to partitions, but all the interfaces are equal. One way > to represent them would be to create a class device without a > dev entry and have the chardev interfaces as child kobjects of that: > > /sys/class/tape/st0/st0/dev > /sys/class/tape/st0/st0a/dev > /sys/class/tape/st0/nst0/dev > /sys/class/tape/st0/device -> ../../... > /sys/class/tape/rtibm0/ntibm0/dev What is "st0" here? Why not just: /sys/class/scsi_tape/st0/dev /sys/class/scsi_tape/st0a/dev /sys/class/scsi_tape/nst0/dev /sys/class/scsi_tape/ntibm0/dev > This would of course be inconsistant with all the other classes. > The second option I see is naming the 'dev' attribute differently: > > /sys/class/tape/st0/dev-st > /sys/class/tape/st0/dev-sta > /sys/class/tape/st0/dev-nst Hm, I probably don't understand tapes. What's the difference between st, sta, and nst? Are they all different char devices for the same tape device? Doing different things? > This is also somewhat inconsistant from udev's point of view, but not > so much from the kernel. True, but we can always work around that in udev, if it's necessary. > The third option is to simply register one class device for each logical > device: > > /sys/class/tape/st0/dev > /sys/class/tape/st0/device -> ../../... > /sys/class/tape/st0a/dev > /sys/class/tape/st0a/device -> ../../... > /sys/class/tape/nst0/dev > /sys/class/tape/nst0/device -> ../../... > /sys/class/tape/rtibm0/dev > > This is at least possible with the least number of changes to udev > and the view of class devices, but not as intuitive for the user. > > I am totally unsure which option should be used or if there is maybe > a better way that I failed to see. > > The other question is how to best design the kernel interface for > registering a tape class device with a variable number of chardev nodes. You might want to take this to the linux-scsi list, as the people there should know how to do this. thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site=8 _______________________________________________ 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