Re: Fwd: Re: A new look at old NFS readdir() problems?

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: David Steele <david@pgbackrest.org>
Cc: Greg Sabino Mullane <htamfids@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Larry Rosenman <ler@lerctr.org>, Pgsql hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-04T16:07:18Z
Lists: pgsql-hackers
On Sat, Jan 4, 2025 at 5:48 AM David Steele <david@pgbackrest.org> wrote:
> We had one issue reported [1] involving Alpine Linux and CIFS and

Not directly relevant for pgbackrest probably, but I noticed that
Alpine comes up in a few reports of failing rm -r on CIFS.  I think it
might be because BSD and GNU rm use fts to buffer pathnames in user
space (narrow window), while Alpine uses busybox rm which has a
classic readdir()/unlink() loop:

https://github.com/brgl/busybox/blob/master/coreutils/rm.c
https://github.com/brgl/busybox/blob/master/libbb/remove_file.c

As for CIFS, there are lots of reports of this sort of thing from
Linux CIFS clients.  I am suspicious of the 32 bit monotonic
resume_key apparently being used to seek to a starting position.  I
don't plan to investigate myself, but ... is that even trying to avoid
skips and duplicates?