All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Bug 1336794 <1336794@bugs.launchpad.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files
Date: Sun, 12 Apr 2015 15:09:57 +0100	[thread overview]
Message-ID: <20150412140956.GN889@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAFkjPTm1gbHiRJqvWj74=T1Bs0KfiEb2xiN9F69EVHkHA8vn=g@mail.gmail.com>

On Sun, Apr 12, 2015 at 12:42:35PM -0000, Eric Van Hensbergen wrote:

> In other words, it only uses the open fd to derrive a path and then
> executes the getattr off of that path.  If that path no longer exists
> (because of unlink or remove) then you are hosed.  In my understanding, the
> "work around" I suppose is the so-called 'silly renaming' where
> remove/unlink simply does a rename until all open instances are closed.

What do you mean, "no longer exists"?  Don't confuse path with pathname -
it's a mount,dentry pair.  And dentry in question bloody well ought to still
have the FID associated with it - you shouldn't use the same FID for
TREMOVE and for TREAD/TWRITE.  TREMOVE clunks the FID passed to it; on
some servers you really have no choice - server discards the file completely
and on any FID that used to refer to it you get an error from that point on.  
On those you'd really have to do something like sillyrename - the only
way to keep IO going for a file sitting on such server is to have it
visible somewhere.  Normal fs(4) is that way; e.g. u9fs(4) isn't - there
FID maps to opened file descriptor on host and TREMOVE on another FID
doesn't break it, as long as host supports IO on opened-but-unlinked files.
I don't remember where qemu 9pfs falls in that respect, but I'd expect it
to be more like u9fs...

Which FID are you passing to server on unlink()?

  reply	other threads:[~2015-04-12 14:10 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 13:52 [Qemu-devel] [Bug 1336794] [NEW] 9pfs does not honor open file handles on unlinked files Cole Robinson
2015-04-10 12:30 ` [Qemu-devel] [Bug 1336794] " Mark Glines
2015-04-12 12:42   ` Eric Van Hensbergen
2015-04-12 12:42     ` [Qemu-devel] " Eric Van Hensbergen
2015-04-12 14:09     ` Al Viro [this message]
2015-04-12 19:08       ` Eric Van Hensbergen
2015-04-13  8:27     ` [V9fs-developer] " Dominique Martinet
2015-04-13  8:27       ` [Qemu-devel] " Dominique Martinet
2015-04-13 16:05       ` Eric Van Hensbergen
2015-04-13 16:05         ` [Qemu-devel] " Eric Van Hensbergen
2015-04-14 16:07         ` Al Viro
2015-04-14 16:07           ` Al Viro
2015-04-14 16:19           ` Eric Van Hensbergen
2015-04-14 16:19             ` [Qemu-devel] " Eric Van Hensbergen
2015-04-14 21:44             ` Al Viro
2015-04-14 21:44               ` Al Viro
2015-04-15 11:28         ` Dominique Martinet
2015-04-15 11:28           ` [Qemu-devel] " Dominique Martinet
2015-04-15 14:17           ` Eric Van Hensbergen
2015-04-15 14:17             ` [Qemu-devel] " Eric Van Hensbergen
2015-04-12 12:45 ` [Qemu-devel] " Eric Van Hensbergen
2016-05-05 20:54 ` Server Angels
2016-05-25 11:14   ` Greg Kurz
2016-05-25 11:51     ` Sean Keeney
2016-05-05 21:01 ` Server Angels
2016-05-24 14:43 ` Launchpad Bug Tracker
2016-06-02 11:59 ` Greg Kurz
2016-06-25  8:25 ` Greg Kurz
2016-06-25  9:24 ` Greg Kurz
2017-08-04  6:03 ` Maxim Kuvyrkov
2017-08-04  8:00 ` Greg Kurz
2018-11-26 21:47 ` Alexander Gretha
2018-11-27  8:07 ` Greg Kurz
2018-11-28 21:20 ` Alexander Gretha
2020-05-26 11:58 ` Greg Kurz
2020-05-27  6:03 ` Greg Kurz
2020-12-10  8:47 ` Thomas Huth
2020-12-10 11:48 ` Thomas Huth
2021-05-03 16:40 ` Thomas Huth

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=20150412140956.GN889@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=1336794@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /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.