Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2024 14:08:03 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        robert@rrbrussell.com, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: noatime on ufs2
Message-ID:  <CANCZdfoB-XqvwRrkqUiNEmqLpFbAUSZiuJzM%2BG1fdeiU2KQFiQ@mail.gmail.com>
In-Reply-To: <20240109174318.MCIB6yhn@steffen%sdaoden.eu>
References:  <ZZqmmM-6f606bLJx@int21h> <CAGMYy3vsSD7HHtGxYXJn%2Busr8GCOd-0Xe1crs-Nx=qw-bYJ6HA@mail.gmail.com> <2eabfb91-afc3-47f7-98b9-1a1791ae6e7d@app.fastmail.com> <6714298.qJWK8QVVMX@ravel> <ZZ0qaGK0UErpdyw3@int21h> <5f370bce-bcdb-47ea-aaa7-551ee092a7d3@app.fastmail.com> <20240109174318.MCIB6yhn@steffen%sdaoden.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <steffen@sdaoden.eu>=
 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 <wnj@ucbvax.Berkeley.EDU>
>   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

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Tue, Jan 9, 2024, 11:11=E2=80=AFAM Steffen Nurpmeso=
 &lt;<a href=3D"mailto:steffen@sdaoden.eu">steffen@sdaoden.eu</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><a href=3D"mailto:robert@rrbrusse=
ll.com" target=3D"_blank" rel=3D"noreferrer">robert@rrbrussell.com</a> wrot=
e in<br>
=C2=A0&lt;<a href=3D"mailto:5f370bce-bcdb-47ea-aaa7-551ee092a7d3@app.fastma=
il.com" target=3D"_blank" rel=3D"noreferrer">5f370bce-bcdb-47ea-aaa7-551ee0=
92a7d3@app.fastmail.com</a>&gt;:<br>
=C2=A0|On Tue, Jan 9, 2024, at 05:13, void wrote:<br>
=C2=A0|&gt; On Tue, Jan 09, 2024 at 09:47:59AM +0100, Olivier Certner wrote=
:i<br>
=C2=A0|&gt;&gt; So, to me, at this point, it still sounds more than a gimmi=
ck <br>
=C2=A0|&gt;&gt; than something really useful.=C2=A0 If someone has a precis=
e use case <br>
<br>
Email existence checks are in UNIX for many decades.<br>
In fact since 1974-11-26 when Ken Thompson added that to login(1).<br>
&quot;You have new mail&quot; is in BSD since<br>
<br>
=C2=A0 Commit:=C2=A0 =C2=A0 =C2=A0Bill Joy &lt;<a href=3D"mailto:wnj@ucbvax=
.Berkeley.EDU" target=3D"_blank" rel=3D"noreferrer">wnj@ucbvax.Berkeley.EDU=
</a>&gt;<br>
=C2=A0 CommitDate: 1978-11-05 19:59:54 -0800<br></blockquote></div></div><d=
iv dir=3D"auto"><br></div><div dir=3D"auto">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...</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">Warner</div><div dir=3D"auto"><br></div><div dir=3D"auto"><div cl=
ass=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex">
=C2=A0 =C2=A0 Start development on BSD 3<br>
=C2=A0 =C2=A0 Create reference copy of all prior development files<br>
<br>
in BSD Mail and csh(1).<br>
And today in bash(1), for example, there can be read<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* If the user has just run a program which man=
ipulates the<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mail file, then don&#39;t bother e=
xplaining that the mail<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0file has been manipulated.=C2=A0 S=
ince some systems don&#39;t change<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the access time to be equal to the=
 modification time when<br>
=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<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0the file has not grown, continue. =
*/<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if ((atime &gt;=3D mtime) &amp;&amp; !file_is_b=
igger)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* If the mod time is later than the access tim=
e and the file<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0has grown, note the fact that this=
 is *new* mail. */<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (use_user_notification =3D=3D 0 &amp;&amp; (=
atime &lt; mtime) &amp;&amp; file_is_bigger)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 message =3D _(&quot;You have new mail in=
 $_&quot;);<br>
<br>
I would not exactly call this a gimmick.<br>
On Linux mount(8) from <a href=3D"https://github.com/karelzak/util-linux" r=
el=3D"noreferrer noreferrer" target=3D"_blank">https://github.com/karelzak/=
util-linux</a> says<br>
<br>
=C2=A0 =C2=A0relatime<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0Update inode access times relative to modify or =
change time. Access<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0time is only updated if the previous access time=
 was earlier than<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0or equal to the current modify or change time. (=
Similar to noatime,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0but it doesn=E2=80=99t break mutt(1) or other ap=
plications that need to<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0know if a file has been read since the last time=
 it was modified.)<br>
<br>
and this is what i use, except for some noatime mount points<br>
(/x/doc, /x/music, /x/pub, to be exact).<br>
<br>
--steffen<br>
|<br>
|Der Kragenbaer,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The=
 moon bear,<br>
|der holt sich munter=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0he cheerfully=
 and one by one<br>
|einen nach dem anderen runter=C2=A0 wa.ks himself off<br>
|(By Robert Gernhardt)<br>
<br>
</blockquote></div></div></div>

--0000000000007dae3b060e89b695--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoB-XqvwRrkqUiNEmqLpFbAUSZiuJzM%2BG1fdeiU2KQFiQ>