From nobody Tue Jan 9 21:08:03 2024 X-Original-To: freebsd-current@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 4T8k6p2Sm7z56P6k for ; Tue, 9 Jan 2024 21:08:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 4T8k6n3T56z40y6 for ; Tue, 9 Jan 2024 21:08:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=NO96LfWG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::62a) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a2814fa68eeso274490766b.1 for ; Tue, 09 Jan 2024 13:08:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1704834496; x=1705439296; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=S5zfz9YeVt15VctawArXgtos2ULJxb/GQ9PlXKDeoQQ=; b=NO96LfWGcZnkE6QbvnTnK+1EDSa3RFMxPRk8/6kgsFTFbi9bwXI0Ck6dlzsxAmYR2i zDowa2djQ6R+0yjGjTDIt0g+2llKyhBzg3FO5cff9eS1Qsat9DaW7cQvrlSHa2Tagokz CLhcNIys2KUm2IkdKgv5qmTVSexoc3SeNJ6Kig7lBDSCrG9FEyxlBuCmpCkTnIArl5G3 1j306a519kG8OZotE7kxzvCafxq5JsJngSy6FBo/ZBsZWK11QPtoCnXkDeAtKPk/Wbbv E5wxVJo/mZJ/dZ6yku2beciNj5Q4ZMW1LHYaUKtBGUY+3DQOV9GRHUO+XKxVrhtYVw4e 6d4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704834496; x=1705439296; h=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=S5zfz9YeVt15VctawArXgtos2ULJxb/GQ9PlXKDeoQQ=; b=DuDHkiEXIRJtHckgYqWWhIcz5cbRK9hmdJER2CIMxinQPM4GlXXH0MwgZtaXZ5FUyZ aytqKRtxEBksXWxOX1chl5gm9Mkng7Ig2ZRS9U4p7fiVZqFlF0vOE1pztMzF8l0U1Ym4 Um+BlqS01WIm9Xeu4XO/4o5FlkhZFZYCnAe1o3FrFkC0NyqUtZ3V5Xw+FDDdwC7Q2C3k LUGq3s0vKxa9JBVcAbg+7nYBr1UiTBBvWSBjwoPHFaGLp6EfiOKy4W6V5trZTVAkJb/V eY8+G4W7M/bf4Qx01lIhdFL5iLdwH5jeBPlkiYofqfAfAU9KwoHfFIoEJDLPeAYVy22g zSOA== X-Gm-Message-State: AOJu0YywQzlIjxKfjK/wPW0si7fyORfwy7cCfqXn3Jkl9yR+rJECNk83 gXG01ICv/G9ISSgJVsLLcNnDIP4AAW6BZ4o5ZAl01R6jObjZ4p0lb6Od7fm/FhI= X-Google-Smtp-Source: AGHT+IHW1BUhbL0Y6FMy+VJwHHfqFQZuVReTT/M77QjjWZVRbfM8VPhgA1p6BZEN6roWc11AmZnmdHr6gYkBqRq1n3U= X-Received: by 2002:a17:906:80e:b0:a23:339f:3313 with SMTP id e14-20020a170906080e00b00a23339f3313mr51228ejd.55.1704834495256; Tue, 09 Jan 2024 13:08:15 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <2eabfb91-afc3-47f7-98b9-1a1791ae6e7d@app.fastmail.com> <6714298.qJWK8QVVMX@ravel> <5f370bce-bcdb-47ea-aaa7-551ee092a7d3@app.fastmail.com> <20240109174318.MCIB6yhn@steffen%sdaoden.eu> In-Reply-To: <20240109174318.MCIB6yhn@steffen%sdaoden.eu> From: Warner Losh Date: Tue, 9 Jan 2024 14:08:03 -0700 Message-ID: Subject: Re: noatime on ufs2 To: robert@rrbrussell.com, FreeBSD Current Content-Type: multipart/alternative; boundary="0000000000007dae3b060e89b695" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62a:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4T8k6n3T56z40y6 --0000000000007dae3b060e89b695 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 9, 2024, 11:11=E2=80=AFAM Steffen Nurpmeso = wrote: > robert@rrbrussell.com wrote in > <5f370bce-bcdb-47ea-aaa7-551ee092a7d3@app.fastmail.com>: > |On Tue, Jan 9, 2024, at 05:13, void wrote: > |> On Tue, Jan 09, 2024 at 09:47:59AM +0100, Olivier Certner wrote:i > |>> So, to me, at this point, it still sounds more than a gimmick > |>> than something really useful. If someone has a precise use case > > Email existence checks are in UNIX for many decades. > In fact since 1974-11-26 when Ken Thompson added that to login(1). > "You have new mail" is in BSD since > > Commit: Bill Joy > CommitDate: 1978-11-05 19:59:54 -0800 > It has also been used for almost as long to see if log files have changed if you set your MAIL variable to that. So not just for email... Warner Start development on BSD 3 > Create reference copy of all prior development files > > in BSD Mail and csh(1). > And today in bash(1), for example, there can be read > > /* If the user has just run a program which manipulates the > mail file, then don't bother explaining that the mail > file has been manipulated. Since some systems don't change > the access time to be equal to the modification time when > the mail in the file is manipulated, check the size also. If > the file has not grown, continue. */ > if ((atime >=3D mtime) && !file_is_bigger) > continue; > > /* If the mod time is later than the access time and the file > has grown, note the fact that this is *new* mail. */ > if (use_user_notification =3D=3D 0 && (atime < mtime) && > file_is_bigger) > message =3D _("You have new mail in $_"); > > I would not exactly call this a gimmick. > On Linux mount(8) from https://github.com/karelzak/util-linux says > > relatime > Update inode access times relative to modify or change time. Acces= s > time is only updated if the previous access time was earlier than > or equal to the current modify or change time. (Similar to noatime= , > but it doesn=E2=80=99t break mutt(1) or other applications that ne= ed to > know if a file has been read since the last time it was modified.) > > and this is what i use, except for some noatime mount points > (/x/doc, /x/music, /x/pub, to be exact). > > --steffen > | > |Der Kragenbaer, The moon bear, > |der holt sich munter he cheerfully and one by one > |einen nach dem anderen runter wa.ks himself off > |(By Robert Gernhardt) > > --0000000000007dae3b060e89b695 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Jan 9, 2024, 11:11=E2=80=AFAM Steffen Nurpmeso= <steffen@sdaoden.eu> wrote= :
robert@rrbrussell.com wrot= e in
=C2=A0<5f370bce-bcdb-47ea-aaa7-551ee0= 92a7d3@app.fastmail.com>:
=C2=A0|On Tue, Jan 9, 2024, at 05:13, void wrote:
=C2=A0|> On Tue, Jan 09, 2024 at 09:47:59AM +0100, Olivier Certner wrote= :i
=C2=A0|>> So, to me, at this point, it still sounds more than a gimmi= ck
=C2=A0|>> than something really useful.=C2=A0 If someone has a precis= e use case

Email existence checks are in UNIX for many decades.
In fact since 1974-11-26 when Ken Thompson added that to login(1).
"You have new mail" is in BSD since

=C2=A0 Commit:=C2=A0 =C2=A0 =C2=A0Bill Joy <wnj@ucbvax.Berkeley.EDU= >
=C2=A0 CommitDate: 1978-11-05 19:59:54 -0800

It has also been used for almos= t as long to see if log files have changed if you set your MAIL variable to= that. So not just for email...

Warner

=C2=A0 =C2=A0 Start development on BSD 3
=C2=A0 =C2=A0 Create reference copy of all prior development files

in BSD Mail and csh(1).
And today in bash(1), for example, there can be read

=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* If the user has just run a program which man= ipulates the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mail file, then don't bother e= xplaining that the mail
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0file has been manipulated.=C2=A0 S= ince some systems don't change
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the access time to be equal to the= modification time when
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the mail in the file is manipulate= d, check the size also.=C2=A0 If
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the file has not grown, continue. = */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if ((atime >=3D mtime) && !file_is_b= igger)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;

=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* If the mod time is later than the access tim= e and the file
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0has grown, note the fact that this= is *new* mail. */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (use_user_notification =3D=3D 0 && (= atime < mtime) && file_is_bigger)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 message =3D _("You have new mail in= $_");

I would not exactly call this a gimmick.
On Linux mount(8) from https://github.com/karelzak/= util-linux says

=C2=A0 =C2=A0relatime
=C2=A0 =C2=A0 =C2=A0 =C2=A0Update inode access times relative to modify or = change time. Access
=C2=A0 =C2=A0 =C2=A0 =C2=A0time is only updated if the previous access time= was earlier than
=C2=A0 =C2=A0 =C2=A0 =C2=A0or equal to the current modify or change time. (= Similar to noatime,
=C2=A0 =C2=A0 =C2=A0 =C2=A0but it doesn=E2=80=99t break mutt(1) or other ap= plications that need to
=C2=A0 =C2=A0 =C2=A0 =C2=A0know if a file has been read since the last time= it was modified.)

and this is what i use, except for some noatime mount points
(/x/doc, /x/music, /x/pub, to be exact).

--steffen
|
|Der Kragenbaer,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The= moon bear,
|der holt sich munter=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0he cheerfully= and one by one
|einen nach dem anderen runter=C2=A0 wa.ks himself off
|(By Robert Gernhardt)

--0000000000007dae3b060e89b695--