Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp125035ybz; Tue, 21 Apr 2020 06:03:56 -0700 (PDT) X-Google-Smtp-Source: APiQypKwlZWoiDeKwZYVbO3qX1mHdmkorrpGwHFoyE7KQrIqdpUqiZPQjmXK0wrBAv5Nh6Ad+3jZ X-Received: by 2002:a17:906:3492:: with SMTP id g18mr19983232ejb.112.1587474236721; Tue, 21 Apr 2020 06:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587474236; cv=none; d=google.com; s=arc-20160816; b=ef8chqPoVHGfVufk0dSlXGpSLC4Bk64EqNPzS7Hb9xbafXR8xAt02PocDUaES3zmYi KjoSPOTzLRkJbCzbly8r8ReXEMYn0lFP54hm2YO1cBLuSegCima0554ZsyQA8CqtSGJM E00+Zqk72ZKUSyB0jm2QoL9AZLiCKa86M0le0sxRGTFuFc+mI/sdnW6PlThCb0gTuw3S jNEjTrUOG++v+/2QjXZ7mVkr+PDUaCjuGQQ7QvSCnc6UdiXvmEQdtxI87EdqRS2BmueH zQLIxUW/otpS+/Hp+TgU9/+CuWuVGuLGT+HM+YsKIj/cVf6wI12KAEdF79ZtGyK2fxwz w8xw== 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=KeatBysOs4g1w9ucJik06kMFsqtbBYNKB2LJi34r5/g=; b=Aog5gZhq/rKzudUWwFtfNPuY1IlOZZIDaPGzmG6Iv25ChiCJetHo7tXPkXHVwAO2Oh moQvHAHGg6m7UULaw6DFoL2QwscAiIJrOa5kYxDLhcsMWdxDUmVpvcKuH5FXVBwaCsZe Jr8KdBo81fuLM/qIU4a6yd97ttxU4yOfKlk6CAFQ6uzFOuH4dJ8pgJydJPooeLEcxopv 7ZA7c+ZbbCp/jjEje2AcHgvTc9qhKMBKVw5n3Pg2R1dLSEdATDIfJkW0g94E46h9iH6M 1aP2yy3eRDWcaSpnNPvlPU/U4KE4hediAvN71C6gznRIa9Q7u1cNyTPv77TKQDn4m4S1 JHSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZEHK3zuT; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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. [23.128.96.18]) by mx.google.com with ESMTP id y11si1439590ejp.513.2020.04.21.06.03.11; Tue, 21 Apr 2020 06:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZEHK3zuT; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 S1728864AbgDUNCz (ORCPT + 99 others); Tue, 21 Apr 2020 09:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728866AbgDUNCy (ORCPT ); Tue, 21 Apr 2020 09:02:54 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4182C061A10 for ; Tue, 21 Apr 2020 06:02:52 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id k133so11896407oih.12 for ; Tue, 21 Apr 2020 06:02:52 -0700 (PDT) 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=KeatBysOs4g1w9ucJik06kMFsqtbBYNKB2LJi34r5/g=; b=ZEHK3zuTVFYNcFuYOAgxTYB5atjiPGX1lleSsfDtvhignUa7fXzs6WpktzR/OAVEGc 8E1uyGgs3LDOOXc9qAnO0YfOfqcefQ0zM0EsxYkHnrO9Vimg1IYDc6wS9LWjTHf5ERWR nL+zBcQ57ReI1KIsOr4yD8DEpcD17YWO2UH3Zuy2GfokaHahgq5LDJ0qoaSrz408loCy o34nyylhNIzvvTfjUW1vstzHutbCavTyktxKpSkL1KZuaVaEUwLhEezSih6ycNwuMmie RP4kvXAfsYlrZ5pxQahkOhx5t+2D+DWKRNGNiEhW7iAV9LcHogVirvt6RpdWnfvwwrq3 iJSw== 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=KeatBysOs4g1w9ucJik06kMFsqtbBYNKB2LJi34r5/g=; b=gCQZyspAIBqOzBa4BEpAq5xghEYE3AnP38H6uor7EsTzSvOeKokn5kFjMYlINA8HbU eRbjB9R/DS8z6F2plorO++btjZ6RV8fxOKZwAltXZ2npDjwQFykzja56QlE4oAE0Kw0Y Fig1Mk7mBS0LZ2muq2XxFJznzcSW6422pF4XsQsXex5hcoMAEQwdD8+HzsL0AACCCXj+ C7ZZMkmZx6v72rsGcGrtjLlS+FyTxxJcNqqT73UngAZk7NETQtiD4CLixjPVmo+AjLko 8tKTbFCIV3EBCCtkkv97B770IQeWfk6fPshbEyXTF0kbuSnkTcgrbhQqePQmB8TvDe1x wO0g== X-Gm-Message-State: AGi0PuYLVpYXALmOrf5zQbcaxpVoraRcLFQe7Oigp7ZBNOm5SPPuuHRb ZTZ4t0YjFPB6iRyMoDGOThTZQqa+aRyuVnPfTceoTw== X-Received: by 2002:aca:c751:: with SMTP id x78mr3059673oif.163.1587474172245; Tue, 21 Apr 2020 06:02:52 -0700 (PDT) MIME-Version: 1.0 References: <20200331133536.3328-1-linus.walleij@linaro.org> <87v9luwgc6.fsf@mid.deneb.enyo.de> In-Reply-To: From: Peter Maydell Date: Tue, 21 Apr 2020 14:02:39 +0100 Message-ID: Subject: Re: [PATCH] fcntl: Add 32bit filesystem mode To: Andreas Dilger Cc: Florian Weimer , Linus Walleij , "Theodore Ts'o" , Ext4 Developers List , linux-fsdevel , Linux API , QEMU Developers , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, 21 Apr 2020 at 00:51, Andreas Dilger wrote: > Another question I had here is whether the filesystem needs to provide > 32-bit values for other syscalls, such as stat() and statfs()? For > ext4, stat() is not going to return a 64-bit inode number, but other > filesystems might (e.g. Lustre has a mode to do this). Similarly, > should statfs() scale up f_bsize until it can return a 32-bit f_blocks > value? We also had to do this ages ago for Lustre when 32-bit clients > couldn't handle > 16TB filesystems, but that is a single disk today. > > Should that be added into F_SET_FILE_32BIT_FS also? Interesting question. The directory-offset is the thing that's got peoples' attention because it's what has actually been hit in real-world situations, but other syscalls have the same potential problem too. The closest I can think of to a 'general rule' (in terms of what QEMU would like) would be "behave the same way you would for a compat32 syscall if you had one, or how you would behave on an actual 32-bit host". thanks -- PMM