From: Greg Kurz <groug@kaod.org>
To: Veaceslav Falico <veaceslav.falico@huawei.com>
Cc: Eduard Shishkin <eduard.shishkin@huawei.com>,
Antonios Motakis <antonios.motakis@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Jani Kokkonen <Jani.Kokkonen@huawei.com>,
"vfalico@gmail.com" <vfalico@gmail.com>,
"Wangguoli (Andy)" <andy.wangguoli@huawei.com>,
Jiangyiwen <jiangyiwen@huawei.com>,
"zhangwei (CR)" <zhangwei555@huawei.com>,
"Emilio G. Cota" <cota@braap.org>
Subject: Re: [Qemu-devel] [RFC] qid path collision issues in 9pfs
Date: Mon, 29 Jan 2018 18:05:06 +0100 [thread overview]
Message-ID: <20180129180506.33520c68@bahia.lan> (raw)
In-Reply-To: <f0bd7f3d-d3ba-556b-3c69-cbfaf7d7b929@huawei.com>
On Thu, 25 Jan 2018 17:08:40 +0100
Veaceslav Falico <veaceslav.falico@huawei.com> wrote:
> On 1/25/2018 3:46 PM, Veaceslav Falico wrote:
[...]
> >
> > I've reproduced it today without fscache:
> >
> > host:
> > mount -o bind /tmp/mounted t1
> > mount -o bind /tmp/mounted t2
> >
> > guest:
> > / # tail -f t1/file &
> > / # 321
> >
> > / # cat t2/file
> > 321
> > / #
> >
> > host:
> > mv t1/file t1/file_moved
> >
> > guest:
> > / # cat t2/file
> > cat: can't open 't2/file': No such file or directory
> > / # mount | grep fscache
> > / #
>
> Sorry, disregard this test case, it's operating normally -
> when we move the t1/file, we also move the t2/file, as they're
> the same directory... Sorry, it's a brainfart after a long
> discussion about the issue :).
>
No problem :)
> So, it's still not reproducible without (fs)cache guest-side.
>
>
> Anyway, the question below still stands - is the guest
> allowed to re-use the FIDs for the files with same QIDs?
>
AFAIU FIDs have a 1:1 relation to either a path in the file hierarchy or
to an open file. I don't think they can be re-used.
> >
> > Also, per internal discussions, we're not sure if the guest side
> > is allowed to reuse the FIDs opened previously for same QID.paths.
> >
> > QEMU holds FID.path for each FID, which contains the actual FS path,
> > i.e. "/path/to/file".
> >
> > So, if we (guest) have two "identical" (per QID.path and RFC) files
> > (f1 and f2), though in different directories (host and guest), and
> > we've accessed f1 once (FID 10, for example) - are we allowed to
> > re-use FID 10 for f2, if f1's QID.path == f2's QID.path ?
> >
> >>
> >>>
> >>>>
> >>>> Thanks,
> >>>> Eduard.
> >>>>
> >>>>>
> >>>>>>>
> >>>>>>>> With our proof of concept patch, the issues caused by qid path collisions go away, so it can be seen as an interim solution of sorts. However, the chance of collisions is not eliminated, we are just replacing the current strategy, which is almost guaranteed to cause collisions in certain use cases, with one that makes them more rare. We think that a virtio feature flag for longer qid paths is the only way to eliminate these issues completely.
> >>>>>>>>
> >>>>>>>> This is the extent that we were able to analyze the issue from our side, we would like to hear if there are some better ideas, or which approach would be more appropriate for upstream.
> >>>>>>>>
> >>>>>>>> Best regards,
> >>>>>>>>
> >>>>>>>
> >>>>>>> Cheers,
> >>>>>>>
> >>>>>>> --
> >>>>>>> Greg
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>> .
> >>>>
> >>>
> >>>
> >>
> >> .
> >>
> >
>
>
next prev parent reply other threads:[~2018-01-29 17:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 11:32 [Qemu-devel] [RFC] qid path collision issues in 9pfs Antonios Motakis
2018-01-12 14:27 ` Daniel P. Berrange
2018-01-12 15:05 ` Veaceslav Falico
2018-01-12 17:00 ` Greg Kurz
2018-01-12 16:25 ` Greg Kurz
2018-01-12 16:14 ` Greg Kurz
2018-01-15 3:49 ` Antonios Motakis
2018-01-19 10:27 ` Greg Kurz
2018-01-19 15:52 ` Eduard Shishkin
2018-01-19 16:36 ` Greg Kurz
2018-01-19 16:37 ` Veaceslav Falico
2018-01-19 18:05 ` Greg Kurz
2018-01-19 18:51 ` Eduard Shishkin
2018-01-25 14:46 ` Veaceslav Falico
2018-01-25 16:08 ` Veaceslav Falico
2018-01-29 17:05 ` Greg Kurz [this message]
2018-01-22 12:40 ` Eduard Shishkin
2018-01-24 15:09 ` Greg Kurz
2018-01-20 0:05 ` Emilio G. Cota
2018-01-20 22:03 ` Emilio G. Cota
2018-01-24 13:30 ` Greg Kurz
2018-01-24 16:40 ` Antonios Motakis
2018-01-24 18:05 ` Eduard Shishkin
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=20180129180506.33520c68@bahia.lan \
--to=groug@kaod.org \
--cc=Jani.Kokkonen@huawei.com \
--cc=andy.wangguoli@huawei.com \
--cc=antonios.motakis@huawei.com \
--cc=cota@braap.org \
--cc=eduard.shishkin@huawei.com \
--cc=jiangyiwen@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=veaceslav.falico@huawei.com \
--cc=vfalico@gmail.com \
--cc=zhangwei555@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).