Displaying 13 results from an estimated 13 matches for "virtio_fs_setup_vqs".
2019 Sep 05
0
[PATCH 10/18] virtiofs: Do not use device managed mem for virtio_fs and virtio_fs_vq
...lt;vgoyal at redhat.com>
---
fs/fuse/virtio_fs.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index f2936daca39c..1ea0f889e804 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -446,7 +446,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
vq_callback_t **callbacks;
const char **names;
unsigned int i;
- int ret;
+ int ret = 0;
virtio_cread(vdev, struct virtio_fs_config, num_queues,
&fs->num_queues);
@@ -454,9 +454,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
r...
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
On Mon, Oct 21, 2019 at 10:03:39AM +0200, Miklos Szeredi wrote:
[..]
> > static void virtio_fs_hiprio_dispatch_work(struct work_struct *work)
> > @@ -502,6 +522,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
> > names[VQ_HIPRIO] = fs->vqs[VQ_HIPRIO].name;
> > INIT_WORK(&fs->vqs[VQ_HIPRIO].done_work, virtio_fs_hiprio_done_work);
> > INIT_LIST_HEAD(&fs->vqs[VQ_HIPRIO].queued_reqs);
> > + INIT_LIST_HEAD(&...
2020 Aug 05
1
[PATCH v3 31/38] virtio_fs: convert to LE accessors
...S. Tsirkin <mst at redhat.com>
---
fs/fuse/virtio_fs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 4c4ef5d69298..104f35de5270 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -606,8 +606,8 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
unsigned int i;
int ret = 0;
- virtio_cread(vdev, struct virtio_fs_config, num_request_queues,
- &fs->num_request_queues);
+ virtio_cread_le(vdev, struct virtio_fs_config, num_request_queues,
+ &fs->num_request_queues);
if (fs->num_reques...
2019 Oct 30
0
[PATCH 3/3] virtiofs: Use completions while waiting for queue to be drained
...doing reinit or waiting for completion already.
+ */
+ mutex_lock(&virtio_fs_mutex);
+ virtio_fs_drain_all_queues_locked(fs);
+ mutex_unlock(&virtio_fs_mutex);
+}
+
static void virtio_fs_start_all_queues(struct virtio_fs *fs)
{
struct virtio_fs_vq *fsvq;
@@ -581,6 +598,7 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
INIT_LIST_HEAD(&fs->vqs[VQ_HIPRIO].end_reqs);
INIT_DELAYED_WORK(&fs->vqs[VQ_HIPRIO].dispatch_work,
virtio_fs_hiprio_dispatch_work);
+ init_completion(&fs->vqs[VQ_HIPRIO].in_flight_zero);
spin_lock_init(&fs->vqs[VQ_HIPRIO].lock);...
2019 Oct 15
7
[PATCH 0/5] virtiofs: Fix couple of deadlocks
Hi,
We have couple of places which can result in deadlock. This patch series
fixes these.
We can be called with fc->bg_lock (for background requests) while
submitting a request. This leads to two constraints.
- We can't end requests in submitter's context and call fuse_end_request()
as it tries to take fc->bg_lock as well. So queue these requests on a
list and use a worker to
2019 Oct 30
6
[PATCH 0/3] virtiofs: Small Cleanups for 5.5
Hi Miklos,
Here are few small cleanups for virtiofs for 5.5. I had received some
comments from Michael Tsirkin on original virtiofs patches and these
cleanups are result of these comments.
Thanks
Vivek
Vivek Goyal (3):
virtiofs: Use a common function to send forget
virtiofs: Do not send forget request "struct list_head" element
virtiofs: Use completions while waiting for queue
2019 Sep 05
0
[PATCH 09/18] virtiofs: Add an helper to start all the queues
...q = &fs->vqs[i];
+ spin_lock(&fsvq->lock);
+ fsvq->connected = true;
+ spin_unlock(&fsvq->lock);
+ }
+}
+
/* Add a new instance to the list or return -EEXIST if tag name exists*/
static int virtio_fs_add_instance(struct virtio_fs *fs)
{
@@ -483,10 +496,10 @@ static int virtio_fs_setup_vqs(struct virtio_device *vdev,
if (ret < 0)
goto out;
- for (i = 0; i < fs->nvqs; i++) {
+ for (i = 0; i < fs->nvqs; i++)
fs->vqs[i].vq = vqs[i];
- fs->vqs[i].connected = true;
- }
+
+ virtio_fs_start_all_queues(fs);
out:
kfree(names);
kfree(callbacks);
--
2.20.1
2019 Sep 06
1
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...;dev, sizeof(*fs), GFP_KERNEL);
> > > + if (!fs)
> > > + return -ENOMEM;
> > > + vdev->priv = fs;
> > > +
> > > + ret = virtio_fs_read_tag(vdev, fs);
> > > + if (ret < 0)
> > > + goto out;
> > > +
> > > + ret = virtio_fs_setup_vqs(vdev, fs);
> > > + if (ret < 0)
> > > + goto out;
> > > +
> > > + /* TODO vq affinity */
> > > + /* TODO populate notifications vq */
> >
> > what's notifications vq?
>
> It has not been implemented yet. At some point of time...
2019 Sep 05
38
[PATCH 00/18] virtiofs: Fix various races and cleanups round 1
Hi,
Michael Tsirkin pointed out issues w.r.t various locking related TODO
items and races w.r.t device removal.
In this first round of cleanups, I have taken care of most pressing
issues.
These patches apply on top of following.
git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v4
I have tested these patches with mount/umount and device removal using
qemu monitor. For
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...one(struct virtqueue *vq)
> +{
> + struct virtio_fs_vq *fsvq = vq_to_fsvq(vq);
> +
> + dev_dbg(&vq->vdev->dev, "%s %s\n", __func__, fsvq->name);
> +
> + schedule_work(&fsvq->done_work);
> +}
> +
> +/* Initialize virtqueues */
> +static int virtio_fs_setup_vqs(struct virtio_device *vdev,
> + struct virtio_fs *fs)
> +{
> + struct virtqueue **vqs;
> + vq_callback_t **callbacks;
> + const char **names;
> + unsigned int i;
> + int ret;
> +
> + virtio_cread(vdev, struct virtio_fs_config, num_queues,
> + &fs->...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...one(struct virtqueue *vq)
> +{
> + struct virtio_fs_vq *fsvq = vq_to_fsvq(vq);
> +
> + dev_dbg(&vq->vdev->dev, "%s %s\n", __func__, fsvq->name);
> +
> + schedule_work(&fsvq->done_work);
> +}
> +
> +/* Initialize virtqueues */
> +static int virtio_fs_setup_vqs(struct virtio_device *vdev,
> + struct virtio_fs *fs)
> +{
> + struct virtqueue **vqs;
> + vq_callback_t **callbacks;
> + const char **names;
> + unsigned int i;
> + int ret;
> +
> + virtio_cread(vdev, struct virtio_fs_config, num_queues,
> + &fs->...
2019 Sep 18
0
[PATCH v6] virtio-fs: add virtiofs filesystem
...one(struct virtqueue *vq)
> +{
> + struct virtio_fs_vq *fsvq = vq_to_fsvq(vq);
> +
> + dev_dbg(&vq->vdev->dev, "%s %s\n", __func__, fsvq->name);
> +
> + schedule_work(&fsvq->done_work);
> +}
> +
> +/* Initialize virtqueues */
> +static int virtio_fs_setup_vqs(struct virtio_device *vdev,
> + struct virtio_fs *fs)
> +{
> + struct virtqueue **vqs;
> + vq_callback_t **callbacks;
> + const char **names;
> + unsigned int i;
> + int ret = 0;
> +
> + virtio_cread(vdev, struct virtio_fs_config, num_queues,
> + &fs...
2019 Sep 05
0
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...+
> > + fs = devm_kzalloc(&vdev->dev, sizeof(*fs), GFP_KERNEL);
> > + if (!fs)
> > + return -ENOMEM;
> > + vdev->priv = fs;
> > +
> > + ret = virtio_fs_read_tag(vdev, fs);
> > + if (ret < 0)
> > + goto out;
> > +
> > + ret = virtio_fs_setup_vqs(vdev, fs);
> > + if (ret < 0)
> > + goto out;
> > +
> > + /* TODO vq affinity */
> > + /* TODO populate notifications vq */
>
> what's notifications vq?
It has not been implemented yet. At some point of time we want to have
a notion of notification queu...