search for: do_handle_io

Displaying 2 results from an estimated 2 matches for "do_handle_io".

2010 Mar 23
1
[RFC] vhost-blk implementation
...workqueue.h> +#include <linux/rcupdate.h> +#include <linux/file.h> + +#include "vhost.h" + +#define VHOST_BLK_VQ_MAX 1 + +struct vhost_blk { + struct vhost_dev dev; + struct vhost_virtqueue vqs[VHOST_BLK_VQ_MAX]; + struct vhost_poll poll[VHOST_BLK_VQ_MAX]; +}; + +static int do_handle_io(struct file *file, uint32_t type, uint64_t sector, + struct iovec *iov, int in) +{ + loff_t pos = sector << 8; + int ret = 0; + + if (type & VIRTIO_BLK_T_FLUSH) { + ret = vfs_fsync(file, file->f_path.dentry, 1); + } else if (type & VIRTIO_BLK_T_OUT) { + ret = vfs_writev(file,...
2010 Mar 23
1
[RFC] vhost-blk implementation
...workqueue.h> +#include <linux/rcupdate.h> +#include <linux/file.h> + +#include "vhost.h" + +#define VHOST_BLK_VQ_MAX 1 + +struct vhost_blk { + struct vhost_dev dev; + struct vhost_virtqueue vqs[VHOST_BLK_VQ_MAX]; + struct vhost_poll poll[VHOST_BLK_VQ_MAX]; +}; + +static int do_handle_io(struct file *file, uint32_t type, uint64_t sector, + struct iovec *iov, int in) +{ + loff_t pos = sector << 8; + int ret = 0; + + if (type & VIRTIO_BLK_T_FLUSH) { + ret = vfs_fsync(file, file->f_path.dentry, 1); + } else if (type & VIRTIO_BLK_T_OUT) { + ret = vfs_writev(file,...