lkml.org 
[lkml]   [2006]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH 2/8] inode-diet: Move i_pipe into a union
On Mon, Jun 19, 2006 at 07:19:26PM +0200, Jan Engelhardt wrote:
>
> >Move the i_pipe pointer into a union that will be shared with i_bdev
> >and i_cdev.
>
> >+ union {
> >+ struct pipe_inode_info *i_pipe;
> >+ };
>
> Since in the next patch you did
>
> - if (inode->i_bdev)
> + if (S_ISBLK(inode->i_mode) && inode->i_bdev)
>
> I am just asking, for clarity, if there were any similar lines for
> pipes that should now read S_IFIFO(inode->i_mode) too, like for bdevs.

Nope, I didn't see any, and I did audit all of the places that used
i_pipe. At least in the mainline kernel, all of the places which used
i_pipe were in places were we knew already that we were dealing with a
pipe.

As was mentioned in earlier comment, this will be problematic for the
out-of-tree System V Streams code, which hijacks i_pipe as another
place to store 4 bytes of random data needed for the Streams code (I
believe they needed a pointer to the stream head -- the v_str pointer
in a legacy Unix system's inode). But, that is an out-of-tree kernel
module, and it's a clear abuse of the i_pipe element in any case.

- Ted
-
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-06-19 21:08    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog