Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp988528imm; Wed, 17 Oct 2018 11:25:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ccm9go8yyVc3qpqW591MV3+WwoSxzAAkJ+bkMVSSJG4DVHYXScbqKQ1qT8omqkbj60OY9 X-Received: by 2002:a63:2066:: with SMTP id r38-v6mr25338260pgm.289.1539800730756; Wed, 17 Oct 2018 11:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539800730; cv=none; d=google.com; s=arc-20160816; b=HKBUnNmAJUjZYhfCmwVshtxt4GDRtkAPe7qVzPF4zqqICp2Av5/Ah9ajhQ2aRaEvO7 Q5PFWXio8ObxLTWYgN84F26F0K7niOSnfVHcg16P2gD2NXewmWLDJBZOlK4pYoZL96SH 5S2j6HbTrtAO3kvcgzg9p8G84T/TTbmdTFnRjpwNw07BbGopMh22DEONGSjrbMb7Idp9 x4W+MG8L7mtteftSGO08YrYga3vxSLTvd6BkCszKVy91Phe++qjKEBn0woVBAooKP5sA 5gPUZodHWQRJ0jk5xOIy9DpPTnhMYSXT+E0oXXpC5dl8QWuYcWvSLUDcIyJuP3l8Mrz0 N+QA== 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 :mime-version:dkim-signature; bh=jEHi1AMjdbAwrev8nCRhSDplTWAP8UBAL9Bfnxo3x5Y=; b=UHfSTczHvwAex7+I5iLjUcCLvsXoIbo/BTHjrNVx1hTUPZ6tghoXRL1B6QjckeVVU9 ilclaO0NuJsT5zZFe5oKg3l7rfOFelUn9i2rqfQ3pKv78FaehaUUod3oNVkrS59bAyKu HDq1DexVZKs/5644P5wVMcYmm5KGeL0arGThEX4bvpSMbetRcH98NaReFjV+Bp+kjBIj Qvc/briUIBjCrwRrY7/BGR1FIm0tGjCm174hasds3G16arYStq7Kab2v9dZ1UkGDfA+s B7pum+2eGJWMe27gMVKKT5a/HdapTUrYCZ+BLiKdWWtubpWSIKQR7bCEnDrldISd7Ld8 IQcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=eV78ha4C; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si18434589pgm.222.2018.10.17.11.25.14; Wed, 17 Oct 2018 11:25:30 -0700 (PDT) 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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=eV78ha4C; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728171AbeJRCVd (ORCPT + 99 others); Wed, 17 Oct 2018 22:21:33 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:51565 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727610AbeJRCVd (ORCPT ); Wed, 17 Oct 2018 22:21:33 -0400 Received: by mail-it1-f196.google.com with SMTP id 74-v6so3523971itw.1 for ; Wed, 17 Oct 2018 11:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=jEHi1AMjdbAwrev8nCRhSDplTWAP8UBAL9Bfnxo3x5Y=; b=eV78ha4C6zx1PXWS8EftW+4ca/GEvZt838JEdrQBh0cqNlr/qGpT12Lf6d3ABMzEEq WbK0vVtXU1xQPRZtofd3QguOKyKiI0C9b+kK1FgAnf3PRFhj7Z8o8FIII3Fa8QXF+eRE 5dnJSTNe/hLahHv+dupFN6/Q6uBE6dME99/jQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=jEHi1AMjdbAwrev8nCRhSDplTWAP8UBAL9Bfnxo3x5Y=; b=D58oLhC43RbRf1kdNJtT57hPOpU7IiEig5gNrszQLzm2r9axlSxiw4IuraNl554+h1 Mi4zNrlKmxPoJ4mqyrMfuh/Kr7/9s8HHqtuW5xnkcgRmxBYm/vGVqTU9YmfHqPCcOAjy qSh3ocZSDtAkqeoc9+k/MOUSD86k9tb/a3/z5noy0GwCZydcI9zcWCcgASeZ8Q9VTSoM 8KbwH+waMFgvt1GZrNwwV71AXDhlC3QrJ4Sc2Q5KQPErl858H8DEmYQ22M9HxwhDedim gGtl6Xo3D6Jsn886CJjKCpjuUyFLh2YM4lWPJz0MCu1LtukP23pUcTTCaqqMgqGSfVtl BxtA== X-Gm-Message-State: ABuFfog2S88yVkOczkR7N15nmESuJvE7Tvzs2IsbmHqIORHKo22GMJc2 +8gBV4J/c8wWpwnlldTo5LorQZj/ahIKHTEx8LHADREpJ1jEDg== X-Received: by 2002:a02:55c1:: with SMTP id e184-v6mr20668657jab.35.1539800679182; Wed, 17 Oct 2018 11:24:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bf41:0:0:0:0:0 with HTTP; Wed, 17 Oct 2018 11:24:38 -0700 (PDT) X-Originating-IP: [212.96.48.140] From: Miklos Szeredi Date: Wed, 17 Oct 2018 20:24:38 +0200 Message-ID: Subject: statx(2) API and documentation To: Michael Kerrisk , David Howells Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linux API 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 I'm trying to implement statx for fuse and ran into the following issues: - Need a STATX_ATTRIBUTES bit, so that userspace can explicitly ask for stx_attribute; otherwise if querying has non-zero cost, then filesystem cannot do it without regressing performance. - STATX_ALL definition is unclear, can this change, or is it fixed? If it's the former, than that's a backward compatibility nightmare. If it's the latter, then what's the point? - STATX_ATIME is cleared from stx_mask on SB_RDONLY, and on NFS it is also cleared on MNT_NOATIME, but not on MNT_RDONLY. We need some sort of guideline in the documentation about what constitutes "unsupported": does atime become unsupported because filesystem is remounted r/o? If so, why isn't this case handled consistently in the VFS and filesystems? - What about fields that are not cached when statx() is called with AT_STATX_DONT_SYNC? E.g. stx_btime is supported by the filesystem, but getting it requires a roundtrip to the server. Requesting STATX_BTIME in the mask and adding AT_STATX_DONT_SYNC to the flags means the filesystem has to decide which it will honor. My feeling is that it should honor AT_STATX_DONT_SYNC and clear STATX_BTIME in stx_mask. Documentation has no word about this case. Thanks, Miklos