search for: vhost_blk_pass_ioctl

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

2018 Nov 06
0
[PATCH 1/1] Add vhost_blk driver
...= f->private_data; > + void __user *argp = (void __user *)arg; > + int fd; > + u64 __user *featurep = argp; > + u64 features; > + long ret; > + struct vhost_vring_state s; > + > + switch (ioctl) { > + case VHOST_SET_MEM_TABLE: > + vhost_blk_stop(blk); > + ret = vhost_blk_pass_ioctl(blk, ioctl, argp); > + break; Why is this necessary? Existing vhost devices pass the ioctl through without an explicit case for it. > + case VHOST_SET_VRING_NUM: > + if (copy_from_user(&s, argp, sizeof(s))) > + return -EFAULT; > + ret = vhost_blk_pass_ioctl(blk, ioctl, ar...
2018 Nov 02
0
[PATCH 1/1] Add vhost_blk driver
...); > + goto out_file; > + } > + > + } > + ret = 0; > + goto out_dev; > +out_file: > + fput(backend); > + blk->backend = NULL; > +out_dev: > + mutex_unlock(&blk->dev.mutex); > + vhost_blk_flush(blk); > + return ret; > +} > + > +static long vhost_blk_pass_ioctl(struct vhost_blk *blk, unsigned int ioctl, > + void __user *argp) > +{ > + long ret; > + > + mutex_lock(&blk->dev.mutex); > + ret = vhost_dev_ioctl(&blk->dev, ioctl, argp); > + if (ret == -ENOIOCTLCMD) > + ret = vhost_vring_ioctl(&blk->dev, ioctl, a...