From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 810DEC55184 for ; Tue, 21 Apr 2020 13:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D2C72076B for ; Tue, 21 Apr 2020 13:02:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZEHK3zuT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbgDUNCz (ORCPT ); Tue, 21 Apr 2020 09:02:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728285AbgDUNCy (ORCPT ); Tue, 21 Apr 2020 09:02:54 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD329C0610D5 for ; Tue, 21 Apr 2020 06:02:52 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id x10so11949641oie.1 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=js/6eDca4jcQB9JB74Pjvhpu50Tvpy24vnmhHQkgdyMWpejpATOapmHpcZEjgBzUJ0 HFiJoMnw0F4ZELPByB1TIgSnOzCiVQPym+axPzlnFXuHYLfae5D94izrVdr5fg1vyckT 9WM2ixHE2mjGx6LNzyXtjJW09eaWoMe9gowieVP1B29LbxDV7PNZKa5tzwtO5WqGl9MF YyH179Bsmlf1lMhOji6pJSRsp27MVLm6qDxk23j+2RDrzqIVg5rG4RXL2kquuPE9ynDf LqPpKRdU8doT9T9icR/0cPftv35QZXQg/f2TMUH3ng6VKNonXRFnD1JW/53To0iajAYz Hapg== X-Gm-Message-State: AGi0PubFJ6QHLOconH5u+Jl/Nowzq64Ne4fNjZ/rnzVXINw3q+1uTmM0 WGzv942aV+psOp9zEs5L2NDSS2PJr6ufqxP14DAJ6w== X-Google-Smtp-Source: APiQypLEdn8xTZKTZv9gRqG5Fj19mVLGqJN/fnq7VfXeiz5gV6tiXoLVzH0IzsAvypZbVip6HiFZw00aj2c/+0a/9rE= 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67189C54FD0 for ; Tue, 21 Apr 2020 13:04:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32142206F4 for ; Tue, 21 Apr 2020 13:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZEHK3zuT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32142206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQsZj-0002Wz-5L for qemu-devel@archiver.kernel.org; Tue, 21 Apr 2020 09:04:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44956) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQsYB-0000Z0-2j for qemu-devel@nongnu.org; Tue, 21 Apr 2020 09:02:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQsYA-0002sG-FR for qemu-devel@nongnu.org; Tue, 21 Apr 2020 09:02:54 -0400 Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]:45791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQsYA-0002q0-1y for qemu-devel@nongnu.org; Tue, 21 Apr 2020 09:02:54 -0400 Received: by mail-oi1-x242.google.com with SMTP id k133so11896408oih.12 for ; Tue, 21 Apr 2020 06:02:53 -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=q7NV4nmT9fVGSBZYgvymgwMHxwDJoiNDoFZfoSDYZB9N5hZuoHqe4+CBvLqKU+mmpz nUq+rrdLcu+DvePjAxF8r8jChfQgqWmXDv6XtoJYnKPAl6vrelJiWWCRUsQ9cHCMCNGW WLyCTXb9eEYOdEaCpEaIUFRCw3xK2+sRLnsejP40Jhglz1kulCdsoaCy+sLtvbJyBIau qa3m3sUQ7HOJU/GSeeHYI6C0MMTatTjGipy+B8ZV0PdUR2pezSjKw69sa0+tSmXFdxIi 8cQtzNVwJdhTPhaQtzSZVv/ze0Nos83trTXJS9hF6kvhUacQfkgJQhKMQAIfgGVHrtjC NpeA== X-Gm-Message-State: AGi0PuYwfObmUk3XDKShz2GLUfYz0Reg4Q5Mtbkvw6MKPiDuPaVqUpmS zmlCbrM7Kknu6J9RXMDe4Q/taPZdtZR/2PGOWwj/sQ== X-Google-Smtp-Source: APiQypLEdn8xTZKTZv9gRqG5Fj19mVLGqJN/fnq7VfXeiz5gV6tiXoLVzH0IzsAvypZbVip6HiFZw00aj2c/+0a/9rE= 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 Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::242; envelope-from=peter.maydell@linaro.org; helo=mail-oi1-x242.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::242 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Theodore Ts'o , Linux API , Linus Walleij , QEMU Developers , Florian Weimer , Andy Lutomirski , linux-fsdevel , Ext4 Developers List Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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