NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/57735: mtree: FreeBSD unsubmitted patches
The following reply was made to PR bin/57735; it has been noted by GNATS.
From: Jose Luis Duran <jlduran%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/57735: mtree: FreeBSD unsubmitted patches
Date: Sat, 2 Dec 2023 12:16:09 -0300
--00000000000002492b060b885e2e
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Sat, Dec 2, 2023 at 10:40=E2=80=AFAM Christos Zoulas <christos%zoulas.co@localhost=
m> wrote:
> Thank you! I don't understand why we need to set errno to 0 before
> calling fts_read()
> because it is supposed to do it so I did not. Is it necessary?
>
Reading the commit message:
> This is addressing cases such as fts_read(3) encountering an [EIO]
> from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be
> seen as a successful traversal in some of these cases while silently
> discarding expected work.
> As noted in
> [
https://github.com/freebsd/freebsd-src/commit/73a0af46b854be94a05fcc4d46036=
19a00ac5707
]
> fts_read() does not set errno to 0 on a successful
> EOF so it needs to be set before calling it. Otherwise we might see
> a random error from one of the iterations.
...made me take a look at fts.c in NetBSD, and your commit:
https://github.com/NetBSD/src/commit/b53fea69d008d28365e2dd90e145beaaa53528=
78
gave me an idea of what I should do next.
In short, for NetBSD, there should be no need, the commit is good. For
FreeBSD, there is the corner case described in the commit message above, so
I need to fix a few things before (or at least try)! In the meantime, I'll
keep it just for FreeBSD.
Thank you!
--00000000000002492b060b885e2e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr">On Sat, Dec 2, 2023 at 10:40=E2=80=AFAM C=
hristos Zoulas <<a href=3D"mailto:christos%zoulas.com@localhost">christos@zoulas.c=
om</a>> wrote:</div><div class=3D"gmail_quote"><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-lef=
t-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
=C2=A0Thank you! I don't understand why we need to set errno to 0 befor=
e calling fts_read()<br>
=C2=A0because it is supposed to do it so I did not. Is it necessary?<br></b=
lockquote><div><br></div><div>Reading the commit message:<br></div><div><br=
></div>> This is addressing cases such as fts_read(3) encountering an [E=
IO]<br>> from fchdir(2) when FTS_NOCHDIR is not set. That would otherwis=
e be<br>> seen as a successful traversal in some of these cases while si=
lently<br>> discarding expected work.<br><br>> As noted in</div><div =
class=3D"gmail_quote">> [<a href=3D"https://github.com/freebsd/freebsd-s=
rc/commit/73a0af46b854be94a05fcc4d4603619a00ac5707">https://github.com/free=
bsd/freebsd-src/commit/73a0af46b854be94a05fcc4d4603619a00ac5707</a>]</div><=
div class=3D"gmail_quote">> fts_read() does not set errno to 0 on a succ=
essful<br>> EOF so it needs to be set before calling it. Otherwise we mi=
ght see<br><div>> a random error from one of the iterations.</div><div><=
br></div><div>...made me take a look at fts.c in NetBSD, and your commit: <=
a href=3D"https://github.com/NetBSD/src/commit/b53fea69d008d28365e2dd90e145=
beaaa5352878">https://github.com/NetBSD/src/commit/b53fea69d008d28365e2dd90=
e145beaaa5352878</a> gave me an idea of what I should do next.</div><div><b=
r></div><div>In short, for NetBSD, there should be no need, the commit is g=
ood. For FreeBSD, there is the corner case described in the commit message =
above, so I need to fix a few things before (or at least try)! In the meant=
ime, I'll keep it just for FreeBSD.</div><div><br></div><div>Thank you!=
</div></div></div>
--00000000000002492b060b885e2e--
Home |
Main Index |
Thread Index |
Old Index