Displaying 11 results from an estimated 11 matches for "fr_sent".
Did you mean:
nr_sent
2019 Oct 15
7
[PATCH 0/5] virtiofs: Fix couple of deadlocks
...itter can't
make progress. Deadlock.
Fix this by punting the requests to a list and retry submission later
with the help of a worker.
Thanks
Vivek
Vivek Goyal (5):
virtiofs: Do not end request in submission context
virtiofs: No need to check fpq->connected state
virtiofs: Set FR_SENT flag only after request has been sent
virtiofs: Count pending forgets as in_flight forgets
virtiofs: Retry request submission from worker context
fs/fuse/virtio_fs.c | 165 +++++++++++++++++++++++++++++---------------
1 file changed, 111 insertions(+), 54 deletions(-)
--
2.20.1
2019 Sep 05
0
[PATCH 01/18] virtiofs: Remove request from processing list before calling end
In error path we are calling fuse_request_end() but we need to clear
FR_SENT bit as well as remove request from processing queue. Otherwise
fuse_request_end() triggers a warning as well as other issues show up.
Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
---
fs/fuse/virtio_fs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fuse/virtio_fs.c b/fs/fu...
2020 Jun 18
0
[PATCH AUTOSEL 5.4 096/266] virtiofs: schedule blocking async replies in separate worker
...pages; i++) {
+ thislen = ap->descs[i].length;
+ if (len < thislen) {
+ WARN_ON(ap->descs[i].offset);
+ page = ap->pages[i];
+ zero_user_segment(page, len, thislen);
+ len = 0;
+ } else {
+ len -= thislen;
+ }
+ }
+ }
+
+ spin_lock(&fpq->lock);
+ clear_bit(FR_SENT, &req->flags);
+ spin_unlock(&fpq->lock);
+
+ fuse_request_end(fc, req);
+ spin_lock(&fsvq->lock);
+ dec_in_flight_req(fsvq);
+ spin_unlock(&fsvq->lock);
+}
+
+static void virtio_fs_complete_req_work(struct work_struct *work)
+{
+ struct virtio_fs_req_work *w =
+ contai...
2020 Jun 18
0
[PATCH AUTOSEL 5.7 131/388] virtiofs: schedule blocking async replies in separate worker
...pages; i++) {
+ thislen = ap->descs[i].length;
+ if (len < thislen) {
+ WARN_ON(ap->descs[i].offset);
+ page = ap->pages[i];
+ zero_user_segment(page, len, thislen);
+ len = 0;
+ } else {
+ len -= thislen;
+ }
+ }
+ }
+
+ spin_lock(&fpq->lock);
+ clear_bit(FR_SENT, &req->flags);
+ spin_unlock(&fpq->lock);
+
+ fuse_request_end(fc, req);
+ spin_lock(&fsvq->lock);
+ dec_in_flight_req(fsvq);
+ spin_unlock(&fsvq->lock);
+}
+
+static void virtio_fs_complete_req_work(struct work_struct *work)
+{
+ struct virtio_fs_req_work *w =
+ contai...
2019 Oct 21
0
[PATCH 1/5] virtiofs: Do not end request in submission context
...irtio_fs_enqueue_req(fsvq, req);
> > if (ret < 0) {
> > if (ret == -ENOMEM || ret == -ENOSPC) {
> > /* Virtqueue full. Retry submission */
> > @@ -965,7 +989,13 @@ __releases(fiq->lock)
> > clear_bit(FR_SENT, &req->flags);
> > list_del_init(&req->list);
> > spin_unlock(&fpq->lock);
> > - fuse_request_end(fc, req);
> > +
> > + /* Can't end request in submission context. Use a worker */
>...
2019 Sep 06
1
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...; + pr_err("virtio-fs: %s disconnected\n", __func__);
> > > + fuse_request_end(fc, req);
> > > + return;
> > > + }
> > > + list_add_tail(&req->list, fpq->processing);
> > > + spin_unlock(&fpq->lock);
> > > + set_bit(FR_SENT, &req->flags);
> > > + /* matches barrier in request_wait_answer() */
> > > + smp_mb__after_atomic();
> > > + /* TODO check for FR_INTERRUPTED? */
> >
> >
> > ?
>
> hmm... we don't support FR_INTERRUPTED. Stefan, do you remember why
&...
2019 Sep 18
0
[PATCH v6] virtio-fs: add virtiofs filesystem
...islen) {
> + WARN_ON(ap->descs[i].offset);
> + page = ap->pages[i];
> + zero_user_segment(page, len, thislen);
> + len = 0;
> + } else {
> + len -= thislen;
> + }
> + }
> + }
> +
> + spin_lock(&fpq->lock);
> + clear_bit(FR_SENT, &req->flags);
> + list_del_init(&req->list);
> + spin_unlock(&fpq->lock);
> +
> + fuse_request_end(fc, req);
> + spin_lock(&fsvq->lock);
> + fsvq->in_flight--;
> + spin_unlock(&fsvq->lock);
> + }
> +}
> +
> +/* Virtqueue...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...{
> + WARN_ON(req->page_descs[i].offset);
> + page = req->pages[i];
> + zero_user_segment(page, len, thislen);
> + len = 0;
> + } else {
> + len -= thislen;
> + }
> + }
> + }
> +
> + spin_lock(&fpq->lock);
> + clear_bit(FR_SENT, &req->flags);
> + list_del_init(&req->list);
> + spin_unlock(&fpq->lock);
> +
> + fuse_request_end(fc, req);
> + }
> +}
> +
> +/* Virtqueue interrupt handler */
> +static void virtio_fs_vq_done(struct virtqueue *vq)
> +{
> + struct virtio_fs...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...{
> + WARN_ON(req->page_descs[i].offset);
> + page = req->pages[i];
> + zero_user_segment(page, len, thislen);
> + len = 0;
> + } else {
> + len -= thislen;
> + }
> + }
> + }
> +
> + spin_lock(&fpq->lock);
> + clear_bit(FR_SENT, &req->flags);
> + list_del_init(&req->list);
> + spin_unlock(&fpq->lock);
> +
> + fuse_request_end(fc, req);
> + }
> +}
> +
> +/* Virtqueue interrupt handler */
> +static void virtio_fs_vq_done(struct virtqueue *vq)
> +{
> + struct virtio_fs...
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 05
0
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...ut.h.error = -ENODEV;
> > + pr_err("virtio-fs: %s disconnected\n", __func__);
> > + fuse_request_end(fc, req);
> > + return;
> > + }
> > + list_add_tail(&req->list, fpq->processing);
> > + spin_unlock(&fpq->lock);
> > + set_bit(FR_SENT, &req->flags);
> > + /* matches barrier in request_wait_answer() */
> > + smp_mb__after_atomic();
> > + /* TODO check for FR_INTERRUPTED? */
>
>
> ?
hmm... we don't support FR_INTERRUPTED. Stefan, do you remember why
this TODO is here. If not, I will get rid...