Messages in this thread | | | Date | Tue, 4 Jul 2000 18:32:17 +0100 (BST) | From | Tigran Aivazian <> | Subject | why 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/
| |