All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Liu Bo <bo.liu@linux.alibaba.com>
Cc: virtio-fs@redhat.com, tao.peng@linux.alibaba.com
Subject: Re: [Virtio-fs] [PATCH 3/3] virtio-fs: Waiting for pending forget requests to finish
Date: Thu, 6 Jun 2019 17:14:12 -0400	[thread overview]
Message-ID: <20190606211412.GA13194@redhat.com> (raw)
In-Reply-To: <20190606210645.2o7o53rscennhksl@US-160370MP2.local>

On Thu, Jun 06, 2019 at 02:06:46PM -0700, Liu Bo wrote:

[..]
> > +static void virtio_fs_flush_hiprio_queue(struct virtio_fs_vq *fsvq)
> > +{
> > +	struct virtio_fs_forget *forget;
> > +
> > +	WARN_ON(fsvq->in_flight < 0);
> > +
> > +	/* Go through pending forget reuests and free them */
> > +	spin_lock(&fsvq->lock);
> > +	while(1) {
> > +		forget = list_first_entry_or_null(&fsvq->queued_reqs,
> > +					struct virtio_fs_forget, list);
> > +		if (!forget)
> > +			break;
> > +		kfree(forget);
> > +	}
> > +
> > +	spin_unlock(&fsvq->lock);
> > +
> > +	/* Wait for in flight requests to finish.*/
> > +	while (1) {
> > +		spin_lock(&fsvq->lock);
> > +		if (!fsvq->in_flight) {
> > +			spin_unlock(&fsvq->lock);
> > +			break;
> > +		}
> > +		spin_unlock(&fsvq->lock);
> > +		usleep_range(1000, 2000);
> 
> Looks like #include <linux/delay.h> is also needed in order to pass
> building.

Its already there.

https://gitlab.com/virtio-fs/linux/blob/virtio-fs-dev/fs/fuse/virtio_fs.c#L14

Vivek


      reply	other threads:[~2019-06-06 21:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 18:57 [Virtio-fs] [PATCH 0/3] virtio-fs: Flush forget requests before sending destroy Vivek Goyal
2019-05-31 18:57 ` [Virtio-fs] [PATCH 1/3] Use helper function to get forget requests from fuse Vivek Goyal
2019-06-05 18:16   ` Liu Bo
2019-05-31 18:57 ` [Virtio-fs] [PATCH 2/3] Do not dispatch forget requests once queue is disconnected Vivek Goyal
2019-06-04  3:27   ` Tao Peng
2019-06-05 18:22   ` Liu Bo
2019-05-31 18:57 ` [Virtio-fs] [PATCH 3/3] virtio-fs: Waiting for pending forget requests to finish Vivek Goyal
2019-06-04  4:06   ` Peng Tao
2019-06-04 13:29     ` Vivek Goyal
2019-06-05 18:26   ` Liu Bo
2019-06-05 18:39     ` Vivek Goyal
2019-06-06 21:06   ` Liu Bo
2019-06-06 21:14     ` Vivek Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190606211412.GA13194@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=bo.liu@linux.alibaba.com \
    --cc=tao.peng@linux.alibaba.com \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.