参照元†
- struct file *filep
- char __user *buf
- size_t len
- loff_t *ppos
返り値†
- 標準の非同期 read 関数を使用するファイルシステム
.aio_read=generic_file_aio_read, fs/9p/vfs_file.c:
.aio_read=generic_file_aio_read, fs/adfs/file.c:
.aio_read=generic_file_aio_read, fs/affs/file.c:
.aio_read=generic_file_aio_read, fs/afs/file.c:
.aio_read=generic_file_aio_read, fs/bfs/file.c:
.aio_read=generic_file_aio_read, fs/block_dev.c:
.aio_read=generic_file_aio_read, fs/btrfs/file.c:
.aio_read=generic_file_aio_read, fs/cifs/cifsfs.c:
.aio_read=generic_file_aio_read, fs/cifs/cifsfs.c:
.aio_read=generic_file_aio_read, fs/exofs/file.c:
.aio_read=generic_file_aio_read, fs/ext2/file.c:
.aio_read=generic_file_aio_read, fs/ext3/file.c:
.aio_read=generic_file_aio_read, fs/ext4/file.c:
.aio_read=generic_file_aio_read, fs/fat/file.c:
.aio_read=generic_file_aio_read, fs/gfs2/file.c:
.aio_read=generic_file_aio_read, fs/gfs2/file.c:
.aio_read=generic_file_aio_read, fs/hfs/inode.c:
.aio_read=generic_file_aio_read, fs/hfsplus/inode.c:
.aio_read=generic_file_aio_read, fs/hostfs/hostfs_kern.c:
.aio_read=generic_file_aio_read, fs/hpfs/file.c:
.aio_read=generic_file_aio_read, fs/jffs2/file.c:
.aio_read=generic_file_aio_read, fs/jfs/file.c:
.aio_read=generic_file_aio_read, fs/minix/file.c:
.aio_read=generic_file_aio_read, fs/nilfs2/file.c:
.aio_read=generic_file_aio_read, fs/ntfs/file.c:
.aio_read=generic_file_aio_read, fs/omfs/file.c:
.aio_read=generic_file_aio_read, fs/ramfs/file-mmu.c:
.aio_read=generic_file_aio_read, fs/ramfs/file-nommu.c:
.aio_read=generic_file_aio_read, fs/read_write.c:
.aio_read=generic_file_aio_read, fs/reiserfs/file.c:
.aio_read=generic_file_aio_read, fs/romfs/mmap-nommu.c:
.aio_read=generic_file_aio_read, fs/sysv/file.c:
.aio_read=generic_file_aio_read, fs/ubifs/file.c:
.aio_read=generic_file_aio_read, fs/udf/file.c:
.aio_read=generic_file_aio_read, fs/ufs/file.c:
- 独自の非同期 read 関数を使用するファイルシステム
.aio_read=bad_file_aio_read, fs/bad_inode.c:
.aio_read=ecryptfs_read_update_atime, fs/ecryptfs/file.c:
.aio_read=fuse_dev_read, fs/fuse/dev.c:
.aio_read=fuse_file_aio_read, fs/fuse/file.c:
.aio_read=nfs_file_read, fs/nfs/file.c:
.aio_read=pipe_read, fs/pipe.c:
.aio_read=pipe_read, fs/pipe.c:
.aio_read=ocfs2_file_aio_read, fs/ocfs2/file.c:
.aio_read=ocfs2_file_aio_read, fs/ocfs2/file.c:
.aio_read=smb_file_aio_read, fs/smbfs/file.c:
.aio_read=xfs_file_aio_read, fs/xfs/linux-2.6/xfs_file.c:
ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
{
struct iovec iov = { .iov_base = buf, .iov_len = len };
struct kiocb kiocb;
ssize_t ret;
init_sync_kiocb(&kiocb, filp);
kiocb.ki_pos = *ppos;
kiocb.ki_left = len;
for (;;) {
ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos);
if (ret != -EIOCBRETRY)
break;
- file->f_op は file_operations 型
- 多くのファイルシステムで generic_file_aio_read() を使用する(「参考」章に記載)。
wait_on_retry_sync_kiocb(&kiocb);
}
if (-EIOCBQUEUED == ret)
ret = wait_on_sync_kiocb(&kiocb);
*ppos = kiocb.ki_pos;
return ret;
}
EXPORT_SYMBOL(do_sync_read);
コメント†