From nobody Fri Oct 06 02:48:41 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1tD64ZLvz4wk3P for ; Fri, 6 Oct 2023 02:48:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f173.google.com (mail-vk1-f173.google.com [209.85.221.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1tD570xpz4Wh8; Fri, 6 Oct 2023 02:48:53 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.221.173 as permitted sender) smtp.mailfrom=asomers@gmail.com; dmarc=none Received: by mail-vk1-f173.google.com with SMTP id 71dfb90a1353d-49e035bdca7so51369e0c.2; Thu, 05 Oct 2023 19:48:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696560533; x=1697165333; 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=Ib6HyqAOTYaFa4O6BsOnnAVGe8/ErhNNv9aPJFQOgWc=; b=xNErDFpZ5TqvpN2LZsH3V3LVOPh9AXYlYCU7bOphN3RFwJc28cvI7/FvLpj92cVqxv EGWsdbMShpYBJyAVWvxpVa7YP0ywphwXvglJLbhEXGgMpE5Qd3esgmO5qdJZDsQzaf6T iU/3ZnC9qub7fabr4k8hiT8dXvVwViYOiUq4XlgTBmeT5ugwrQm4Z446fYYHbX6MfZP+ UeDHxg68k8xkuD3b0jfG6WWoflI57BN1pEj3wWDWZAoc9SVYxs3DJ5HaAVJgpjPU+zB/ n35p89TiylKnJGAiKbHndy3GasFYnF/qytZBFfUXWsdZx2QMXLqqAunqW4FTunRDohkt HtDQ== X-Gm-Message-State: AOJu0YwDj6/7ckWCWGK4YllV+zOelDmoXG8AwCKZFOt9S9/oUxZPINLG bAqrpx4/eAJc3TivhDC4/LuNlQZA83JF9hhOjpI= X-Google-Smtp-Source: AGHT+IEjfcUZsef0KrAkSG4DBwAWhRs5gbpn1D5kyGXwh/qokIgwg8sHK1b93IxcI9j9AbhAQ9dyroCGXr0gol3Y5mU= X-Received: by 2002:a05:6122:221a:b0:49a:88a9:cac6 with SMTP id bb26-20020a056122221a00b0049a88a9cac6mr8179402vkb.11.1696560532769; Thu, 05 Oct 2023 19:48:52 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Thu, 5 Oct 2023 19:48:41 -0700 Message-ID: Subject: Re: copy_file_range() doesn't update the atime of an empty file To: Rick Macklem Cc: Mark Johnston , freebsd-hackers@freebsd.org, rmacklem@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.86 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.86)[-0.856]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.173:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.173:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[asomers]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCPT_COUNT_THREE(0.00)[4]; TAGGED_RCPT(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com] X-Rspamd-Queue-Id: 4S1tD570xpz4Wh8 On Thu, Oct 5, 2023 at 6:53=E2=80=AFPM Rick Macklem wrote: > > On Thu, Oct 5, 2023 at 3:30=E2=80=AFPM Rick Macklem wrote: > > > > On Thu, Oct 5, 2023 at 8:41=E2=80=AFAM Alan Somers wrote: > > > > > > I don't think that Linux is a good model to copy from, where atime is > > > concerned. It long ago gave up on POSIX-compliance for atime by > > > default. In this case, I think it's better to stick as closely as we > > > can to read(2). Preserving the existing behavior of tools like cat, > > > too, is worthwhile I think. > > I have no problem with Mark's patch being applied for the default > > local fs case. NFSv4.2 will not be able to comply with this unless > > (as will be the case for the FreeBSD server) the NFSv4.2 server > > happens to change atime after Mark's patch is applied to the > > FreeBSD NFSv4.2 server (the Linux NFSv4.2 server will not). > I have come up with a NFSv4.2 client patch that explicitly sets atime > for the input file in the same compound RPC as the Copy. It works for > a FreeBSD server without Mark's patch. If a NFSv4.2 server does not > do it, we can argue that the server ignores the Setattr of atime. > > So, with this patch (which I will be testing against assorted servers nex= t > week (an ietf bakeathon testing event) and Mark's patch, the only case > that may need more work is ZFS? > > rick > ps: I'll admit I still doubt anyone cares about atime being set, but the > collective opinion seems to be that it should be set. I think the fusefs copy_file_range will already do this, but I should at least add a test for it. -Alan