lkml.org 
[lkml]   [2000]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectwhy is inode->i_fop = rdwr_pipe_fops for anonymous pipes?
Hi guys,

Linux pipes are single-directional (as opposed to streams pipes,
bidirectional) right? Therefore, I understand why f1->f_op and f2->f_op
are set to different things. But why is inode->i_fop set to rdwr_pipe_fops
(or to anything at all) if there is no way to reach those via
inode->i_fop? The only thing one can do on pipe is
read/write/readv/writev/fcntl/ioctl and all these use file->f_op and not
inode->i_fop.

My guess is that this is due to Linux-specific hack whereby one could open
via /proc/<pid>/fd and so one needs inode->i_fop - is this true or not?

I intuitively ignore the weird things like "using ptrace(2) to do
miracles" or "opening files via /proc/<pid>/fd" which is why some things I
see in VFS code, sometimes, make no sense..

Regards,
Tigran



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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