Displaying 11 results from an estimated 11 matches for "virtio_fs_put".
2019 Sep 06
2
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
...io_fs"? I'm not sure if this is intentional and is supposed to
mean something, but it's confusing.
> +{
> + mutex_lock(&virtio_fs_mutex);
> + kref_put(&fs->refcount, release_virtiofs_obj);
> + mutex_unlock(&virtio_fs_mutex);
> +}
> +
> +static void virtio_fs_put(struct fuse_iqueue *fiq)
Minor issue: this function name is confusingly similar to
virtiofs_put(). Please rename to virtio_fs_fiq_put().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not avai...
2019 Sep 06
2
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
...io_fs"? I'm not sure if this is intentional and is supposed to
mean something, but it's confusing.
> +{
> + mutex_lock(&virtio_fs_mutex);
> + kref_put(&fs->refcount, release_virtiofs_obj);
> + mutex_unlock(&virtio_fs_mutex);
> +}
> +
> +static void virtio_fs_put(struct fuse_iqueue *fiq)
Minor issue: this function name is confusingly similar to
virtiofs_put(). Please rename to virtio_fs_fiq_put().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not avai...
2019 Sep 06
2
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote:
> It is possible that a mount is in progress and device is being removed at
> the same time. Use virtio_fs_mutex to avoid races.
>
> This also takes care of bunch of races and removes some TODO items.
>
> Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
> ---
> fs/fuse/virtio_fs.c | 32
2019 Sep 06
2
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote:
> It is possible that a mount is in progress and device is being removed at
> the same time. Use virtio_fs_mutex to avoid races.
>
> This also takes care of bunch of races and removes some TODO items.
>
> Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
> ---
> fs/fuse/virtio_fs.c | 32
2019 Sep 06
0
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
...entional and is supposed to
> mean something, but it's confusing.
>
> > +{
> > + mutex_lock(&virtio_fs_mutex);
> > + kref_put(&fs->refcount, release_virtiofs_obj);
> > + mutex_unlock(&virtio_fs_mutex);
> > +}
> > +
> > +static void virtio_fs_put(struct fuse_iqueue *fiq)
>
> Minor issue: this function name is confusingly similar to
> virtiofs_put(). Please rename to virtio_fs_fiq_put().
Fixed with ->release semantics. Replaced "virtiofs" with "virtio_fs".
Subject: virtiofs: Make virtio_fs object refcount...
2019 Sep 06
0
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
...the list. Also provides
+ * mutual exclusion in device removal and mounting path
+ */
static DEFINE_MUTEX(virtio_fs_mutex);
static LIST_HEAD(virtio_fs_instances);
@@ -72,17 +74,19 @@ static void release_virtio_fs_obj(struct
kfree(vfs);
}
+/* Make sure virtiofs_mutex is held */
static void virtio_fs_put(struct virtio_fs *fs)
{
- mutex_lock(&virtio_fs_mutex);
kref_put(&fs->refcount, release_virtio_fs_obj);
- mutex_unlock(&virtio_fs_mutex);
}
static void virtio_fs_fiq_release(struct fuse_iqueue *fiq)
{
struct virtio_fs *vfs = fiq->priv;
+
+ mutex_lock(&virtio_fs_mutex...
2019 Sep 09
0
[Virtio-fs] [PATCH 15/18] virtiofs: Make virtio_fs object refcounted
...> > }
> >
> > +static void release_virtiofs_obj(struct kref *ref)
> > +{
> > + struct virtio_fs *vfs = container_of(ref, struct virtio_fs, refcount);
> > +
> > + kfree(vfs->vqs);
> > + kfree(vfs);
> > +}
> > +
> > +static void virtio_fs_put(struct virtio_fs *fs)
> > +{
> > + mutex_lock(&virtio_fs_mutex);
> > + kref_put(&fs->refcount, release_virtiofs_obj);
> > + mutex_unlock(&virtio_fs_mutex);
> > +}
> > +
> > +static void virtio_fs_put(struct fuse_iqueue *fiq)
> > +{
>...
2019 Sep 05
0
[PATCH 15/18] virtiofs: Make virtio_fs object refcounted
..._fs *vfs = container_of(ref, struct virtio_fs, refcount);
+
+ kfree(vfs->vqs);
+ kfree(vfs);
+}
+
+static void virtiofs_put(struct virtio_fs *fs)
+{
+ mutex_lock(&virtio_fs_mutex);
+ kref_put(&fs->refcount, release_virtiofs_obj);
+ mutex_unlock(&virtio_fs_mutex);
+}
+
+static void virtio_fs_put(struct fuse_iqueue *fiq)
+{
+ struct virtio_fs *vfs = fiq->priv;
+ virtiofs_put(vfs);
+}
+
static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq)
{
WARN_ON(fsvq->in_flight < 0);
@@ -156,8 +178,10 @@ static struct virtio_fs *virtio_fs_find_instance(const char *tag)
mutex_lock(&a...
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 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
...id release_virtiofs_obj(struct kref *ref)
kfree(vfs);
}
+/* Make sure virtiofs_mutex is held */
static void virtiofs_put(struct virtio_fs *fs)
{
- mutex_lock(&virtio_fs_mutex);
kref_put(&fs->refcount, release_virtiofs_obj);
- mutex_unlock(&virtio_fs_mutex);
}
static void virtio_fs_put(struct fuse_iqueue *fiq)
{
struct virtio_fs *vfs = fiq->priv;
+
+ mutex_lock(&virtio_fs_mutex);
virtiofs_put(vfs);
+ mutex_unlock(&virtio_fs_mutex);
}
static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq)
@@ -596,9 +600,8 @@ static void virtio_fs_remove(struct virtio_devi...
2019 Sep 18
0
[PATCH v6] virtio-fs: add virtiofs filesystem
...d->pq;
> +}
> +
> +static void release_virtio_fs_obj(struct kref *ref)
> +{
> + struct virtio_fs *vfs = container_of(ref, struct virtio_fs, refcount);
> +
> + kfree(vfs->vqs);
> + kfree(vfs);
> +}
> +
> +/* Make sure virtiofs_mutex is held */
> +static void virtio_fs_put(struct virtio_fs *fs)
> +{
> + kref_put(&fs->refcount, release_virtio_fs_obj);
> +}
> +
> +static void virtio_fs_fiq_release(struct fuse_iqueue *fiq)
> +{
> + struct virtio_fs *vfs = fiq->priv;
> +
> + mutex_lock(&virtio_fs_mutex);
> + virtio_fs_put(vfs);...