All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Eryu Guan <eguan@linux.alibaba.com>
Cc: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH] virtiofsd: handle NULL dir in lo_do_lookup
Date: Tue, 28 May 2019 17:29:33 -0400	[thread overview]
Message-ID: <20190528212933.GB6446@redhat.com> (raw)
In-Reply-To: <20190523032254.GB15291@e18g06458.et15sqa>

On Thu, May 23, 2019 at 11:22:54AM +0800, Eryu Guan wrote:
> On Thu, May 23, 2019 at 10:06:34AM +0800, Liu Bo wrote:
> > Reported by fstests/generic/467.
> > 
> > open_by_handle_at() called from fuse inside guest can carry fuse mount
> > point to daemon but lo_do_lookup() doesn't know its inode info because
> > it's out of fuse's scope, thus lo_inode(req, parent) ends up with
> > returning a NULL dir and breaks virtiofsd immediately.
> > 
> > Note that it'd break applications that uses open_by_handle_at.
> > 
> > It seems to me that nothing could be done to support open_by_handle_at in
> > this case.
> 
> Then perhaps we should consider disabling exportfs support in virtio-fs
> case? I noticed that currently fuse set
> 
> 	sb->s_export_op = &fuse_export_operations
> 
> unconditionally, maybe we could implement a feature mask in fuse and let
> filesystem implementation registers what features it supports, e.g.
> exportfs in this case.
> 
> Or we could try adding real exportfs support to virtiofs? Though I'm not
> sure if it's possible or worth it at the moment.

If we don't support export operations, we should disable it. Looks like
we have enabled it in virtiofsd.

lo_init() {
        if(conn->capable & FUSE_CAP_EXPORT_SUPPORT)
                conn->want |= FUSE_CAP_EXPORT_SUPPORT;
}

So if we were to disable it, I guess we will have to remove it.

Not sure if it is possible to support export ops in virtio-fs case. Need
to read more about it.

Vivek


  reply	other threads:[~2019-05-28 21:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  2:06 [Virtio-fs] [PATCH] virtiofsd: handle NULL dir in lo_do_lookup Liu Bo
2019-05-23  3:22 ` Eryu Guan
2019-05-28 21:29   ` Vivek Goyal [this message]
2019-05-31 10:05     ` Eryu Guan
2019-07-31 13:01 ` Stefan Hajnoczi
2019-07-31 16:07   ` Dr. David Alan Gilbert

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=20190528212933.GB6446@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=eguan@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.