Re: [RFC] Slimming down struct inode

Theodore Tso
2006-06-15T06:41:15Z

On Wed, Jun 14, 2006 at 06:16:27PM -0600, Brian F. G. Bidulock wrote:
> > 3) Move i_pipe, i_bdev, and i_cdev into a union. An inode cannot
> > simultaneously be a pipe, block device, and character device at the
> > same time.
>
> A STREAMS-based FIFO is both a (named) pipe and a character device at the
> same time. I would prefer if you did not merge i_pipe with i_cdev for this
> reason. In the current GPL'ed out of tree STREAMS implementation, i_pipe
> is used to point to the Stream head (as the normal v_str pointer in the UNIX
> vnode).

I'm not particularly sympathetic to out of tree implementations,
especially one which is as (NOT!) likely to be merged as STREAMS
support. Out of tree patches can always patch struct inode to add all
the bloat they want. Also, it souinds like you're not usually using
i_pipe as a true pointer to a struct pipe_inode_info, but rather as
kludged location to stash your v_str pointer. Why not just have your
STREAMS implementation patch include/linux/fs.h to add a v_str pointer?

- Ted