[lkml]   [2001]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: DEVFS_FL_AUTO_DEVNUM on block devices writes:
> --HlL+5n6rz5pIUxbD
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable

Please fix your mailer to not send this junk.

> I'm trying to write a device driver that dynamically creates block
> devices (kind of like loop does). I'd like to use DEVFS_FL_AUTO_DEVNUM,
> but it looks like devfs doesn't initialize the block queues in any
> useful way. Does anyone have any code that I can use? If so, Cc: me on
> replies. Thanks!

Devfs isn't supposed to manage your block queues. That's not what it's
designed for. Devfs is just a way of managing your device nodes.

Block queue management can be done by the "generic" block I/O layer
(or you can write your own management code, but that's not
practical). This layer requires that you have a major number for your
driver, so that certain information can be shoved into some static
arrays (yes, it's butt-ugly, and it will change in 2.5).

You can use the devfs_alloc_major() function to grab a major number
that won't conflict with another driver. Then use that major when
calling devfs_register().


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:02    [W:0.020 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site