linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: "Theodore Y. Ts'o" <tytso@mit.edu>,
	Peter Maydell <peter.maydell@linaro.org>,
	Andreas Dilger <adilger@dilger.ca>,
	Florian Weimer <fw@deneb.enyo.de>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux API <linux-api@vger.kernel.org>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	lucho@ionkov.net, libc-alpha@sourceware.org,
	Arnd Bergmann <arnd@arndb.de>,
	ericvh@gmail.com, hpa@zytor.com,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	rminnich@sandia.gov, v9fs-developer@lists.sourceforge.net
Subject: Re: [V9fs-developer] [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation
Date: Sat, 29 Dec 2018 05:04:13 +0100	[thread overview]
Message-ID: <20181229040413.GA18900@nautica> (raw)
In-Reply-To: <20181229031416.GH5864@mit.edu>

Theodore Y. Ts'o wrote on Fri, Dec 28, 2018:
> On Sat, Dec 29, 2018 at 03:37:21AM +0100, Dominique Martinet wrote:
> > > Are there going to be cases where a process or a thread will sometimes
> > > want the 64-bit interface, and sometimes want the 32-bit interface?
> > > Or is it always going to be one or the other?  I wonder if we could
> > > simply add a new flag to the process personality(2) flags.
> > 
> > That would likely work for qemu user, but the qemu system+9p case is
> > going to be more painful..
> > More precisely, the 9p protocol does not plan for anything other than
> > 64bit offset so if the vfs needs to hand out a 32bit offset we'll need
> > to make a correspondance table between the 32bit offsets we hand off and
> > the 64bit ones to use; unless some flag can be passed at lopen to tell
> > the server to always hand out 32bit offsets for this directory... And if
> > we do that then 9p servers will need a way to use both APIs in parallel
> > for both types of directories.
> 
> How about if we add a fcntl(2) mediated flag, which is tied to a
> struct file?  Would that be more or less painful for 9p and qemu
> system+9p?

Hmm. 9P2000.L doesn't have anything akin to fcntl either, the only two
obvious places where we could pass a flag is lopen (which already
handles a bunch of linux-specific flags, e.g. passing O_LARGEFILE
O_NOATIME etc will just forward these through for qemu/diod at least),
or adding a new parameter to the 9p readdir.

The former would let us get away without modifying the protocol as
servers will just ignore flags they don't handle on implementations I
checked, so it'd definitely be the least effort choice from what I can
tell.


On the other hand a fcntl would solve the server-side problem, it'd
allow the server to request appropriately-sized offsets per fd, so it's
a good start; we "just" need to figure how to translate that on the wire.

-- 
Dominique Martinet | Asmadeus

  reply	other threads:[~2018-12-29  4:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 17:18 d_off field in struct dirent and 32-on-64 emulation Florian Weimer
2018-12-27 17:41 ` [Qemu-devel] " Peter Maydell
2018-12-28  0:23   ` Andreas Dilger
2018-12-28 11:18     ` Peter Maydell
2018-12-28 23:16       ` Andreas Dilger
2018-12-29  0:12         ` Peter Maydell
2018-12-29  1:54           ` Matthew Wilcox
2018-12-29 16:49             ` Andy Lutomirski
2018-12-30 13:59               ` Peter Maydell
2018-12-29  2:11       ` Theodore Y. Ts'o
2018-12-29  2:37         ` Dominique Martinet
2018-12-29  3:14           ` Theodore Y. Ts'o
2018-12-29  4:04             ` Dominique Martinet [this message]
     [not found] ` <C65D3222-723F-4C0B-AF02-38488C302E84@amacapital.net>
2018-12-27 17:56   ` Florian Weimer
2018-12-27 17:58 ` Adhemerval Zanella
2018-12-27 18:09   ` Florian Weimer
2018-12-28 11:53     ` Adhemerval Zanella
2018-12-28 11:56       ` Florian Weimer
2018-12-28 12:01         ` Florian Weimer
2018-12-28 12:21           ` Adhemerval Zanella
2018-12-31 17:03       ` Joseph Myers
2019-01-02 13:16         ` Adhemerval Zanella
2018-12-28  2:23 ` Dmitry V. Levin
2018-12-28  7:38   ` Florian Weimer
2018-12-28 15:26 ` Andy Lutomirski

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=20181229040413.GA18900@nautica \
    --to=asmadeus@codewreck.org \
    --cc=adilger@dilger.ca \
    --cc=arnd@arndb.de \
    --cc=ericvh@gmail.com \
    --cc=fw@deneb.enyo.de \
    --cc=hpa@zytor.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rminnich@sandia.gov \
    --cc=tytso@mit.edu \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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).