On Fri, 2013-02-22 at 02:11 +0000, Seymour, Shane M wrote: > First forgive me for using outlook for this, if there are any issues with what I sent let me know and I'll send it again from gmail. This is also my first attempt at a kernel patch so please be gentle. > > This patch was written to enable tape statistics via sysfs for the dt > driver based on kernel 3.8.0-rc6. It creates two new files in sysfs > and is based on work done previously in 2005 by Kai Mäkisara. Any > feedback would be greatly appreciated. I'm afraid we can't do it the way you're proposing. files in sysfs must conform to the one value per file rule (so we avoid the ABI nastiness that plagues /proc). You can create a stat directory with a bunch of files, but not a single file that gives all values. > Assuming sysfs is mounted at /sys the first file > is /sys/bus/scsi/drivers/st/drives which gives a single number > indicating what the largest tape drive instance assigned by st_probe > in the st module is. If it's 4 it possible that st0, st1, st2, and st3 > exist on the system. Since tape drives can later be disconnected they > don't have to exist, the count is a hint so it's possible to gather > statistics in a loop with an upper bound. This makes it easier in > iostat to gather statistcs. I don't really get why you need this. What's wrong with getting the exact information from /sys/class/scsi_tape? James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html