Skip to content

Commit

Permalink
Maintain count of in flight requests for VQ_REQUEST queue
Browse files Browse the repository at this point in the history
As of now we maintain this count only for VQ_HIPRIO. Maintain it for 
VQ_REQUEST as well so that later it can be used to drain VQ_REQUEST
queue.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
  • Loading branch information
rhvgoyal committed Sep 5, 2019
1 parent d4ccbae commit f74b00d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/fuse/virtio_fs.c
Expand Up @@ -360,6 +360,9 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
spin_unlock(&fpq->lock);

fuse_request_end(fc, req);
spin_lock(&fsvq->lock);
fsvq->in_flight--;
spin_unlock(&fsvq->lock);
}
}

Expand Down Expand Up @@ -769,6 +772,7 @@ static int virtio_fs_enqueue_req(struct virtio_fs_vq *fsvq,
goto out;
}

fsvq->in_flight++;
notify = virtqueue_kick_prepare(vq);

spin_unlock(&fsvq->lock);
Expand Down

0 comments on commit f74b00d

Please sign in to comment.