Skip to Content
Mastering Linux Kernel Development
book

Mastering Linux Kernel Development

by CH Raghav Maruthi
October 2017
Intermediate to advanced
354 pages
9h 28m
English
Packt Publishing
Content preview from Mastering Linux Kernel Development

pipefs

Pipes and FIFOs are created and managed by a special filesystem called pipefs. It registers with VFS as a special filesystem. The following is a code excerpt from fs/pipe.c:

static struct file_system_type pipe_fs_type = {           .name = "pipefs",           .mount = pipefs_mount,           .kill_sb = kill_anon_super,};static int __init init_pipe_fs(void){        int err = register_filesystem(&pipe_fs_type);        if (!err) {                pipe_mnt = kern_mount(&pipe_fs_type);                if (IS_ERR(pipe_mnt)) {                        err = PTR_ERR(pipe_mnt);                        unregister_filesystem(&pipe_fs_type);                }      }      return err;}fs_initcall(init_pipe_fs);

It integrates pipe files into VFS by enumerating an inode instance representing each pipe; this allows applications to engage common file APIs read and write. The inode structure contains ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Kernel Development, Third Edition

Linux Kernel Development, Third Edition

Robert Love
Understanding the Linux Kernel

Understanding the Linux Kernel

Daniel P. Bovet, Marco Cesati
Linux Kernel Debugging

Linux Kernel Debugging

Kaiwan N. Billimoria

Publisher Resources

ISBN: 9781785883057Other