This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation
- From: "Theodore Y. Ts'o" <tytso at mit dot edu>
- To: Peter Maydell <peter dot maydell at linaro dot org>, Andreas Dilger <adilger at dilger dot ca>, Florian Weimer <fw at deneb dot enyo dot de>, linux-fsdevel <linux-fsdevel at vger dot kernel dot org>, Linux API <linux-api at vger dot kernel dot org>, Ext4 Developers List <linux-ext4 at vger dot kernel dot org>, <lucho at ionkov dot net>, <libc-alpha at sourceware dot org>, Arnd Bergmann <arnd at arndb dot de>, <ericvh at gmail dot com>, <hpa at zytor dot com>, lkml - Kernel Mailing List <linux-kernel at vger dot kernel dot org>, QEMU Developers <qemu-devel at nongnu dot org>, <rminnich at sandia dot gov>, <v9fs-developer at lists dot sourceforge dot net>
- Date: Fri, 28 Dec 2018 22:14:16 -0500
- Subject: Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation
- References: <87bm56vqg4.fsf@mid.deneb.enyo.de> <CAFEAcA92m4vhzjJ+B=mP_o6Wfhx1XSKo3uWxah3osh=u5UXFuw@mail.gmail.com> <9C6A7D45-CF53-4C61-B5DD-12CA0D419972@dilger.ca> <CAFEAcA9W+JK7_TrtTnL1P2ES1knNPJX9wcUvhfLwxLq9augq1w@mail.gmail.com> <20181229021157.GG5864@mit.edu> <20181229023721.GA9291@nautica>
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?
- Ted