[lkml]   [2001]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux 2.4.10-pre11

On Tue, 18 Sep 2001, Andrea Arcangeli wrote:
> >
> > What are you going to use as mapping->host for it?
> the only info we'd need from the host is the host->i_rdev, so why can't
> we get it from the file->f_dentry->d_inode->i_rdev?

No, just allocate a real inode as part of "struct block_device"
allocation. This is basically what socket etc stuff does - and it's
actually easiest to do it the other way, exactly like sockets do (ie
_embed_ "struct block_device" inside a struct inode as if "block_device"
was just another filesystem), and then just allocate one inode and get the
"struct block_device" allocation for free.

This works really well for sockets, and has worked for a long time. See
how the socket is hidden in "inode->u.socket_i", and how it's trivial to
convert from one to the other.

And the fact is, a block_device _is_ a simple filesystem if you squint
just the right way. Admittedly it's a fairly flat and _boring_ filesystem,
but hey, that's the point of them, after all ;)


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:03    [W:0.111 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site