io trave

io travle

Get Started. It's Free
or sign up with your email address
Rocket clouds
io trave by Mind Map: io trave

1. request_queue

1.1. *request_fn

1.1.1. [while ]rq=blk_fetch_request(q)

1.1.1.1. blk_peek_request

1.1.1.1.1. __elv_next_request

1.1.1.2. blk_fetch_request

1.1.1.2.1. blk_dequeue_request

1.1.2. blk_end_request_all(rq, rv);

1.2. *make_request_fn

1.2.1. *blk_queue_bio(q,bio)

1.2.1.1. blk_queue_split

1.2.1.1.1. generic_make_request

1.2.1.2. el_ret = elv_merge(q, &req, bio)

1.2.1.2.1. ELEVATOR_BACK_MERGE

1.2.1.3. get_request

1.2.1.4. init_request_from_bio(req, bio)

1.2.1.5. current->plug

1.2.1.5.1. [plug]

1.2.1.5.2. [unplug]

1.3. *request list

1.4. __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE)

1.5. ELEVATOR_FRONT_MERGE

1.6. *elevator

1.6.1. type[cfq,deadline]

1.6.1.1. ops

1.6.1.1.1. elevator_merge_req_fn

1.6.1.1.2. elevator_dispatch_fn

1.6.1.1.3. elevator_add_req_fn

2. request

2.1. list_head queuelist

2.2. bio

2.3. struct gendisk *rq_disk

3. bio

3.1. bio *bi_next

3.2. *bi_io_vect

3.2.1. bio_vect[ ]

3.2.1.1. *page

3.2.1.2. offset

3.2.1.3. lenth

3.3. *bi_bdev

3.4. *bi_end_io

3.4.1. (completion call back)

3.5. bvec_iter

3.5.1. bi_sector

3.5.2. bi_size

3.5.3. bi_idx

3.5.4. bi_bvec_done

4. address_space

4.1. *inode

4.2. *radix_tree_root

4.2.1. (page in page cache)

4.3. *address_space_operations

4.3.1. *writepage()

4.3.2. *readpage()

4.3.2.1. submit_bio

4.3.2.1.1. bio

4.3.2.1.2. generic_make_request

4.3.3. *set_page_dirty()

4.3.4. *migratepage()

4.3.5. *readpages()

5. file

5.1. f_mapping

5.2. f_inode

5.3. f_path

5.3.1. vfsmount

5.3.2. dentry

5.4. *f_op

5.4.1. *read

5.4.1.1. [fs_wrapper]generic_file_read_iter

5.4.1.1.1. do_generic_file_read

5.4.2. *write

5.4.3. *llseet

5.4.4. *open

5.4.5. ...

6. files_struct

6.1. fdtable fdtab

6.1.1. **fd

6.1.2. *close_on_exec

6.1.3. *open_fds

6.1.4. *full_fds_bits

6.2. close_on_exec_init

6.3. open_fds_init

6.4. full_fds_bits_init

7. task_struct

7.1. files

7.2. plug

8. SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count)

8.1. 1 fdget_pos

8.1.1. __fget_light

8.1.1.1. current->files

8.2. 2 vfs_read(f.file, buf, count, &pos)

8.2.1. file->f_op->read

8.3. 3 file_pos_write

9. sys_opoen

9.1. SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)

9.1.1. *do_sys_open

9.1.1.1. * build_open_flags- [build &op ]

9.1.1.2. *getname

9.1.1.2.1. getname_flags

9.1.1.3. *get_unused_fd_flags

9.1.1.3.1. __alloc_fd(current->files, 0, rlimit(RLIMIT_NOFILE), flags)

9.1.1.4. *do_filp_open

9.1.1.4.1. set_nameidata

9.1.1.4.2. path_openat

9.1.1.5. fd_install

10. nameidata

10.1. path

10.1.1. vfsmount *mnt

10.1.1.1. sb

10.1.1.2. sb_dentry

10.1.2. dentry

10.1.2.1. d_inode

10.1.2.2. dentry *d_parent

10.1.2.3. char d_iname[DNAME_INLINE_LEN]

10.1.2.4. qstr d_name

10.1.2.5. super_block *d_sb

10.2. inode

10.3. filename

10.4. root[path]

11. VFS

11.1. OVER_LOAD_INODE_[F]OPS

11.1.1. inode_operations

11.1.1.1. [MEM_OPS]

11.1.1.1.1. [fs_spec ]ext4_dir_inode_operations

11.1.1.1.2. [fs_spec ]ext4_file_inode_operations

11.1.2. file_operations

11.1.2.1. [MEM_OPS]

11.1.2.1.1. [fs_wrapper]generic_file_write_iter

11.1.2.1.2. [fs_wrapper]generic_file_read_iter

11.1.3. address_space_operations

11.1.3.1. [fs_spec] ext4_readpage

11.1.3.2. [fs_spec] ext4_readpages

11.1.3.3. [fs_spec] ext4_writepage

11.1.3.4. [fs_spec] ext4_writepages

12. block_device

12.1. block device driver

12.1.1. struct gendisk alloc_disk()

12.1.2. assign value to gendisk

12.1.2.1. major

12.1.2.2. first-minor

12.1.2.3. *fops

12.1.2.3.1. open

12.1.2.3.2. release

12.1.2.3.3. ioctl

12.1.2.4. *reques_queue

12.1.2.4.1. blk_mq_init_queue

12.1.2.4.2. blk_init_queue

12.1.2.4.3. blk_alloc_queue (manually)

13. file_system_type ext4_fs_type

13.1. owner = THIS_MODULE

13.2. .name = "ext4"

13.3. .mount = ext4_mount

13.3.1. mount_bdev(fs_type, flags, dev_name, data, ext4_fill_super)

13.4. .kill_sb = kill_block_super

14. blk_finish_plug

14.1. blk_flush_plug_list(plug, false)

14.2. current->plug = NULL

15. blk_start_plug

15.1. INIT_LIST_HEAD(&plug->list);

16. User land : ssize_t read(int fd, void *buf, size_t count)