Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8786593imu; Sat, 29 Dec 2018 03:49:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ww+FhSz6GSSc9M3Kn5fcDBsoMTk80pMDfdCJ2YEryve9/3o/dELyPXWjR4Jx8/LBwLydUy X-Received: by 2002:a62:160d:: with SMTP id 13mr31233361pfw.203.1546084187031; Sat, 29 Dec 2018 03:49:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546084186; cv=none; d=google.com; s=arc-20160816; b=k+/JCGWZ06Gfh3gwxABO54ELbSScKYA43rUSfyNgxsgvq8fxeQ6kPxDnMB19j2dzNC OpGE8UJGoSDDiFcFgPXBtuCkfHV7rGR0qvH5p6go+/uPjn+4zQmV/iUTRQ3lfS1NC8lX oAuxDYgi17lLWjupGgBsoMo2SgZei8cxks1Fxc38dwoo21mFM9KEqLTEfRUPA9wldaX3 dW6SBM2xDrY4EJeKqIMbDmjYh64dfCas8NsInOBuREuGRLMPocS+iZXZNofqUeiv39nF 5hr5463qEnkj/Ko4yMlBfq+/p7HVEYsBSET90CnlnVbtGfosK9mqoB6KJOzxED2ph/qo /5qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Mtj1PqgoZTm/oiNODLBlwpCVxbSYRtKotA2P1yjpfX8=; b=a9A6G/2nfZKAHbwz5dsttbm5cpMtcpjd7q/Pn84oR+URBPSeFaem+aVnyKnHA+7/u+ 5MfQCo1+GyNf3OsD937+yH4zHkiTZ76ygogDuN72KcCsx231pu1r1MOZQZRTXhGfJbDx h6G4ROuX0ASrjfQHoVHiL4v956IUpthrGxU60jiHzsEwmiqvb8jR9caNdzfHM3iG+gOI Orr7UvmnTJFwxOwlf9elEurBGAVut+WYPI0QMhPpL4gEWKkJxPMQY8fkotlNts6I821R fIx7S2HzJo+SOJEs3iFFTov1OnoZrt+wfCHiqsZ2DpInSMeAS5DNtkg6CpXMecuEJrld 5GWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JlCs6tfS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si13685837plo.435.2018.12.29.03.49.31; Sat, 29 Dec 2018 03:49:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JlCs6tfS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbeL2AMl (ORCPT + 99 others); Fri, 28 Dec 2018 19:12:41 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37995 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbeL2AMl (ORCPT ); Fri, 28 Dec 2018 19:12:41 -0500 Received: by mail-ot1-f66.google.com with SMTP id e12so19832196otl.5 for ; Fri, 28 Dec 2018 16:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mtj1PqgoZTm/oiNODLBlwpCVxbSYRtKotA2P1yjpfX8=; b=JlCs6tfS6PRQNLvutosN4Kpk6uWm1WOa51W2RdGjPYpZc2GfwruDKEiiB7TGnbcZJj TR4JaiF8nx8zgfa4OgXzIzzNJAw94dS1aYvXtl0L5x4J3YV3CmFUrHEX4yCF29Pw/Crv rE4/v8E/RkPr+C5SlbBX2YMWkO6ahrrJtgX/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mtj1PqgoZTm/oiNODLBlwpCVxbSYRtKotA2P1yjpfX8=; b=pWsEPhUt/NW6iBPIDeNJqodHhI0rPznAJLnA1n6x6NXYgfKEuL/2l9RtdLpFuXFkB+ ksz6pkMsQjycj2ivln75NgWXHdc1I5A5W/8VbSzRkmvfzY+7uer+cbEBf2hFtOw6bDy9 nQFlPff79Lh1Ogrz82U4EFDRtXW2Zdrz0XNwHd+9cXljTF8xOFMg0S2zbucvA9rDCxyn G8iW37DvJb9aO+R1DUrGgSLTtUv+VecEHyaLr4f53HGb6fbay7JKX3PN8qU11a+C1j1S eVNpGWEySz7XwCPX7EVaAnJZZleBUAc1n/LWlHkk6PzKfH5b1DP+0ow50cLDS5m+8fry LzzA== X-Gm-Message-State: AJcUukehzaYsBTY11gNy0/U/0mYUWRUN4ekzvQ3GvVXwpcbDQJC304xO zUT/CxDVk3XN5ehKlOfo0Md1JdhSL3rLEelyy/AlFQ== X-Received: by 2002:a05:6830:1115:: with SMTP id w21mr19418042otq.316.1546042359608; Fri, 28 Dec 2018 16:12:39 -0800 (PST) MIME-Version: 1.0 References: <87bm56vqg4.fsf@mid.deneb.enyo.de> <9C6A7D45-CF53-4C61-B5DD-12CA0D419972@dilger.ca> <1EF1B31A-83D8-4642-BEBF-F56E45485223@dilger.ca> In-Reply-To: <1EF1B31A-83D8-4642-BEBF-F56E45485223@dilger.ca> From: Peter Maydell Date: Sat, 29 Dec 2018 00:12:27 +0000 Message-ID: Subject: Re: [Qemu-devel] d_off field in struct dirent and 32-on-64 emulation To: Andreas Dilger Cc: Florian Weimer , linux-fsdevel , Linux API , Ext4 Developers List , Latchesar Ionkov , libc-alpha@sourceware.org, Arnd Bergmann , Eric Van Hensbergen , hpa@zytor.com, lkml - Kernel Mailing List , QEMU Developers , rminnich@sandia.gov, v9fs-developer@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Dec 2018 at 23:16, Andreas Dilger wrot > On Dec 28, 2018, at 4:18 AM, Peter Maydell wrote: > > The problem is that there is no 32-bit API in some cases > > (unless I have misunderstood the kernel code) -- not all > > host architectures implement compat syscalls or allow them > > to be called from 64-bit processes or implement all the older > > syscall variants that had smaller offets. If there was a guaranteed > > "this syscall always exists and always gives me 32-bit offsets" > > we could use it. > > The "32bitapi" mount option would use 32-bit hash for seekdir > and telldir, regardless of what kernel API was used. That would > just set the FMODE_32BITHASH flag in the file->f_mode for all files. A mount option wouldn't be much use to QEMU -- we can't tell our users how to mount their filesystems, which they're often doing lots of other things with besides running QEMU. (Otherwise we could just tell them "don't use ext4", which would also solve the problem :-)) We need something we can use at the individual-syscall level. thanks -- PMM