lkml.org 
[lkml]   [2006]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] pktcdvd: added sysfs interface + bio write queue handling fix
From
Date
On Sat, 2006-09-09 at 14:30 -0700, Greg KH wrote:
> On Sat, Sep 09, 2006 at 08:11:56PM +0200, Thomas Maier wrote:
> > Hello,
> >
> > >> + write_queue_size (r) Contains the size of the bio write
> > >> + queue.
> > ...
> > >> + mapped_to Symbolic link to mapped block device
> > >> + in the /sys/block tree.
> > >
> > > Shouldn't this whole thing be in /sys/class/ instead of /sys/block/ ?
> >
> > Don't know. I thought, the pktcdvd is a block driver, so put
> > the control files into /sys/block ..
> > Is /sys/class better? If yes, where to put it?
>
> Use /sys/class/pktcdvd/ and use struct device instead of struct
> class_device, so I don't have to convert the code later :)

Is this always device specific, or also driver global information? Is
pktcdvd always on a block device? Maybe you just want them to be a group
of attributes in the block device directory where they belong to, like:
/sys/block/sr0/pktcdvd/info
/sys/block/sr0/pktcdvd/write_queue_size
/sys/block/sr0/pktcdvd/...

Does that make sense? We should avoid messing around with symlinks
pointing to other devices, if not absolutely needed. We should also not
create a new device type, just for adding properties to an existing one,
especially if there is not some kind of "device stacking". The
"mapped_to" link to the parent device looks like a wild hack to me, we
should avoid.

Thanks,
Kay

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-10 00:57    [W:0.366 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site