Microservices
The Linux kernel reads the file process source code and the block point super detailed explanation
Take the Linux kernel version 3.13 as an example. First, the kernel read()executes sys_read()functions through system calls . In the file linux/fs/read_write.c://linux/fs/read_write.c SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count) { struct fd f = fdget(fd); // fd file ssize_t ret = -EBADF; if (f.file) { loff_t pos = file_pos_read(f.file); // ret = vfs_read(f.file, buf, count, &pos); // vfs_read if (ret >= 0) file_pos_write(f.file, pos); // fdput(f); } return re