Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13057550rwd; Fri, 23 Jun 2023 15:07:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56Xi+UypRy/Sz4oMgX96tXNTCgNnL2xxyiymfQlD+6FiWLp+hLiEjXGUTZR7l1qiTCw/j4 X-Received: by 2002:a05:6358:e814:b0:131:4d41:c05 with SMTP id gi20-20020a056358e81400b001314d410c05mr8998267rwb.15.1687558074400; Fri, 23 Jun 2023 15:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687558074; cv=none; d=google.com; s=arc-20160816; b=Ki9a3whDLLrHe15xk6YYSqrTyArL1BJNAFNTGVoWzPBBiQL0+Xu/I6rgv5BsRDcI1g DpDmeSv5jNvxqY7B8R6ScmzIk33kCQfevq89enMALxGoWOLe4dhsC+x96cdoNZSkMAys 51GNxmcDyrHLmkN+Xlz+BK1RFLyvX1FOW+iecyK8Fyhtylqnzw0bCBeFrWnCE1/HgKui 7/UyeroCOLyK4k+vKufR50h+2kYWTMzPA3qQVHFY8CHvEL//w+8cOKYKP0dDwr/hWGST IlZN7vs72762xc5ED07zGiQEa5A52fP9cHkfGvqXYOL/g3ppj7OOeBH8c/ALJoPvrbvJ bmqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=laQGVXq6Eq5vx8huIZhgQpbdSACn2501LJRQT7hKbn4=; fh=PhEt3kn2MGqhGqUVoWnkRlNNSpwnjlsFa84Ta+Lq18g=; b=nrWmgOPZjIvKW8vUcePhM4+TPpI8btIjAza6YMDFp56H6nbtr+HICneOMdHbUjJWdD 2MDYlRuGImgCG2CJYb//27vC9eMuLJhXT6FYFyENG/htm6lhh3EeRuH4cxwbE/yrYjQ+ KxvnOgwsf5EUSSD+EadoxIrXog29L5hpH+pmJvIxO4n+Kmnvnk6WMKydcG24GNBeFrbJ y0LevsuNYQ73d5oOwTCA0IZP0S55RDOQlL3/D+hjVnaJul3DE6D6A/3I/brX4KMk4dpQ 55+tEWToospcbghR2JalUUtlWncqJb0rqvMJmaSjgKDixWg0al3phqKmXqXNUemu1j0B B/Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@tavianator.com header.s=google header.b="nWK/FT/Z"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs187-20020a6328c4000000b005301151503esi325881pgb.186.2023.06.23.15.07.40; Fri, 23 Jun 2023 15:07:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@tavianator.com header.s=google header.b="nWK/FT/Z"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231881AbjFWWGK (ORCPT + 99 others); Fri, 23 Jun 2023 18:06:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbjFWWGK (ORCPT ); Fri, 23 Jun 2023 18:06:10 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED7072705; Fri, 23 Jun 2023 15:06:01 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-6300510605bso9567476d6.0; Fri, 23 Jun 2023 15:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tavianator.com; s=google; t=1687557961; x=1690149961; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=laQGVXq6Eq5vx8huIZhgQpbdSACn2501LJRQT7hKbn4=; b=nWK/FT/Zwtll8ccFigrw8j6mxM/K2tAd3Ut+FCmFGIDMLrdFCi3F9p+noxHJVxJOoJ CKCXkb28R+v6xLHcjO/SGcE4TqnhSH83uz9GvmUSGY2yk+5FLQBqpBKCm7rC1GhdnOmB Km9jw57UwFSdwh4zRSoXSEjd0egNTcU5nLCs8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687557961; x=1690149961; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=laQGVXq6Eq5vx8huIZhgQpbdSACn2501LJRQT7hKbn4=; b=eRoOMYuzxJ2RmhffG452tPrnE4cNxGL6lU15J43icQOXRHFntwKVAZJDoGtI+ftIA7 zG6Efhho2PbE8e6HAOzh0iBMmCWgUYgzztoF18sqF0pHEz8OpWTXwPtviCOxXEoz0Nik 6rJQOWQLzC1Fjcq6m+eVipb5cqbaimK4k80C6VXs3/Gw0RE2YcrDapKRN+19MYCJ7R1x 21oo3ZnHYYwGY2bC5Q4+CGeove0e58v0p+SfqFEgal4tmdlgPCk2vQI+8oV6Tmqf3m/l VvbYD5pbkf1XzXoqdjAcIhBC+c6fkxtjynKUYH3YxMaD4RAKpDXYgrXZxQ/CPeYJpt4F eXzQ== X-Gm-Message-State: AC+VfDw2BInEbpX/3HH+gS9xxw32y5bROGkNfDxxzVqcr3yhe5nEZug1 4Srv+V8uautx1ghnQUkwv13UlVrb535sj9EKP0XCdr/pXH0= X-Received: by 2002:a05:6214:2348:b0:626:3a5a:f8dc with SMTP id hu8-20020a056214234800b006263a5af8dcmr30029214qvb.57.1687557960967; Fri, 23 Jun 2023 15:06:00 -0700 (PDT) MIME-Version: 1.0 References: <4154eb6503988c2096f5d30af26d06863fb5d973.1687554467.git.tavianator@tavianator.com> In-Reply-To: From: Tavian Barnes Date: Fri, 23 Jun 2023 18:05:50 -0400 Message-ID: Subject: Re: [PATCH] fs/nfsd: Fix creation time serialization order To: Chuck Lever Cc: linux-nfs@vger.kernel.org, Chuck Lever , Jeff Layton , Ondrej Valousek , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Jun 23, 2023 at 5:48=E2=80=AFPM Chuck Lever wrote: > On Fri, Jun 23, 2023 at 05:09:06PM -0400, tavianator@tavianator.com wrote= : > > From: Tavian Barnes > > > > In nfsd4_encode_fattr(), TIME_CREATE was being written out after all > > other times. However, they should be written out in an order that > > matches the bit flags in bmval1, which in this case are > > > > #define FATTR4_WORD1_TIME_ACCESS (1UL << 15) > > #define FATTR4_WORD1_TIME_CREATE (1UL << 18) > > #define FATTR4_WORD1_TIME_DELTA (1UL << 19) > > #define FATTR4_WORD1_TIME_METADATA (1UL << 20) > > #define FATTR4_WORD1_TIME_MODIFY (1UL << 21) > > > > so TIME_CREATE should come second. > > > > I noticed this on a FreeBSD NFSv4.2 client, which supports creation > > times. On this client, file times were weirdly permuted. With this > > patch applied on the server, times looked normal on the client. > > > > Fixes: e377a3e698fb ("nfsd: Add support for the birth time attribute") > > Link: https://unix.stackexchange.com/q/749605/56202 > > Signed-off-by: Tavian Barnes > > I'm not especially familiar with this area of the protocol, but this > looks correct at first glance. I've applied this to nfsd-fixes for > v6.5. Great, thanks! > Out of interest, what type of filesystem does your server export? It's a btrfs filesystem. --=20 Tavian Barnes