Displaying 8 results from an estimated 8 matches for "fuse_mutex".
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 05
0
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
...out.
+ */
+ err = -EINVAL;
+ if (list_empty(&fs->list)) {
+ pr_info("virtio-fs: tag <%s> not found\n", fs->tag);
goto err;
}
@@ -1007,7 +1016,6 @@ static int virtio_fs_fill_super(struct super_block *sb)
fc = fs->vqs[VQ_REQUEST].fud->fc;
- /* TODO take fuse_mutex around this loop? */
for (i = 0; i < fs->nvqs; i++) {
struct virtio_fs_vq *fsvq = &fs->vqs[i];
@@ -1020,6 +1028,7 @@ static int virtio_fs_fill_super(struct super_block *sb)
/* Previous unmount will stop all queues. Start these again */
virtio_fs_start_all_queues(fs);
fuse_...
2019 Sep 06
0
[PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path
...that case bail out.
+ */
+ err = -EINVAL;
+ if (list_empty(&fs->list)) {
+ pr_info("virtio-fs: tag <%s> not found\n", fs->tag);
goto err;
}
@@ -1007,7 +1016,6 @@ static int virtio_fs_fill_super(struct s
fc = fs->vqs[VQ_REQUEST].fud->fc;
- /* TODO take fuse_mutex around this loop? */
for (i = 0; i < fs->nvqs; i++) {
struct virtio_fs_vq *fsvq = &fs->vqs[i];
@@ -1020,6 +1028,7 @@ static int virtio_fs_fill_super(struct s
/* Previous unmount will stop all queues. Start these again */
virtio_fs_start_all_queues(fs);
fuse_send_init(fc, i...
2019 Sep 05
0
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...gt; > +
> > + ctx.fudptr = (void **)&fs->vqs[VQ_REQUEST].fud;
> > + err = fuse_fill_super_common(sb, &ctx);
> > + if (err < 0)
> > + goto err_free_init_req;
> > +
> > + fc = fs->vqs[VQ_REQUEST].fud->fc;
> > +
> > + /* TODO take fuse_mutex around this loop? */
>
> Don't we need to figure this kind of thing out before this
> code lands upstream?
I think we don't need this TODO. fuse_connection object and associated
super block are still being formed. And my cleanup has taken care of
the additional locking.
Thanks
V...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...it(FR_BACKGROUND, &init_req->flags);
> +
> + ctx.fudptr = (void **)&fs->vqs[VQ_REQUEST].fud;
> + err = fuse_fill_super_common(sb, &ctx);
> + if (err < 0)
> + goto err_free_init_req;
> +
> + fc = fs->vqs[VQ_REQUEST].fud->fc;
> +
> + /* TODO take fuse_mutex around this loop? */
Don't we need to figure this kind of thing out before this
code lands upstream?
> + for (i = 0; i < fs->nvqs; i++) {
> + struct virtio_fs_vq *fsvq = &fs->vqs[i];
> +
> + if (i == VQ_REQUEST)
> + continue; /* already initialized */
> + f...
2019 Sep 03
4
[PATCH v4 15/16] virtio-fs: add virtiofs filesystem
...it(FR_BACKGROUND, &init_req->flags);
> +
> + ctx.fudptr = (void **)&fs->vqs[VQ_REQUEST].fud;
> + err = fuse_fill_super_common(sb, &ctx);
> + if (err < 0)
> + goto err_free_init_req;
> +
> + fc = fs->vqs[VQ_REQUEST].fud->fc;
> +
> + /* TODO take fuse_mutex around this loop? */
Don't we need to figure this kind of thing out before this
code lands upstream?
> + for (i = 0; i < fs->nvqs; i++) {
> + struct virtio_fs_vq *fsvq = &fs->vqs[i];
> +
> + if (i == VQ_REQUEST)
> + continue; /* already initialized */
> + f...
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