lkml.org 
[lkml]   [2006]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pktcdvd: added sysfs interface + bio write queue handling fix
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 :)

> > On Fri, Sep 08, 2006 at 05:40:11PM -0400, Phillip Susi wrote:
> >> Greg KH wrote:
> >> >On Fri, Sep 08, 2006 at 07:55:08PM +0200, Thomas Maier wrote:
> >> >>+/sys/block/pktcdvd/<pktdevname>/packet/
> >> >>+ statistic (r) Show device statistic. One line with
> >> >>+ 5 values in following order:
> >> >>+ packets-started
> >> >>+ packets-end
> >> >>+ written in kB
> >> >>+ read gather in kB
> >> >>+ read in kB
> >> >
> >> >Please no. One value per file is the sysfs rule.
> >> >
> >>
> >> Except in cases like this where you want to read the status of the
> >> device at a given point in time, and you can't do that unless you grab
> >> all the values at once.
> >
> > Then don't use sysfs for that. And is something like this as critical
> > to get that kind of information all in one atomic chunk? It seems
> > merely to be informational.
>
> The "statistic" and "info" files are only for information purpose.

Then please split them up into individual files.

> Into /proc ? No. (i read somewhere /proc should only contain process
> information in future)

Exactly.

> In debugfs? Hmm, this files should be infos that users should be able
> to read, no debug output.

Ok, then multiple files please.

> Is it ok, if i split the "statistic" into 5 files, and put the "info"
> into debugfs ?

Yes, that would be fine.

thanks,

greg k-h
-
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-09 23:37    [W:0.068 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site