linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Trond Myklebust <trond.myklebust@hammerspace.com>
Subject: Re: git regression failures with v6.2-rc NFS client
Date: Wed, 01 Feb 2023 10:53:37 -0500	[thread overview]
Message-ID: <F1833EA0-263F-46DF-8001-747A871E5757@redhat.com> (raw)
In-Reply-To: <5FF4061F-108C-4555-A32D-DDBFA80EE4E7@redhat.com>

On 1 Feb 2023, at 9:10, Benjamin Coddington wrote:
>
> Working on a fix..

.. actually, I have no idea how to fix this - if tmpfs is going to modify
the position of its dentries, I can't think of a way for the client to loop
through getdents() and remove every file reliably.

The patch you bisected into just makes this happen on directories with 18
entries instead of 127 which can be verified by changing COUNT in the
reproducer.

As Trond pointed out in:
https://lore.kernel.org/all/eb2a551096bb3537a9de7091d203e0cbff8dc6be.camel@hammerspace.com/

    POSIX states very explicitly that if you're making changes to the
    directory after the call to opendir() or rewinddir(), then the
    behaviour w.r.t. whether that file appears in the readdir() call is
    unspecified. See
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html

The issue here is not quite the same though, we unlink the first batch of
entries, then do a second getdents(), which returns zero entries even though
some still exist.  I don't think POSIX talks about this case directly.

I guess the question now is if we need to drop the "ls -l" improvement
because after it we are going to see this behavior on directories with >17
entiries instead of >127 entries.

It should be possible to make tmpfs (and friends) generate reliable cookies
by doing something like hashing out the cursor->d_child into the cookie
space.. (waving hands)

Ben


  reply	other threads:[~2023-02-01 15:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 21:15 git regression failures with v6.2-rc NFS client Chuck Lever III
2023-01-31 22:02 ` Benjamin Coddington
2023-02-01 14:10   ` Benjamin Coddington
2023-02-01 15:53     ` Benjamin Coddington [this message]
2023-02-03 14:38       ` Chuck Lever III
2023-02-03 15:13         ` Benjamin Coddington
2023-02-03 15:35           ` Chuck Lever III
2023-02-03 17:14             ` Benjamin Coddington
2023-02-03 18:03               ` Chuck Lever III
2023-02-03 20:01                 ` Benjamin Coddington
2023-02-03 20:25                   ` Chuck Lever III
2023-02-03 22:26                     ` Trond Myklebust
2023-02-03 23:11                       ` Chuck Lever III
2023-02-03 23:53                         ` Hugh Dickins
2023-02-04  0:07                           ` Trond Myklebust
2023-02-04  0:15                             ` Hugh Dickins
2023-02-04  0:59                               ` Trond Myklebust
2023-02-04 11:07                                 ` Thorsten Leemhuis
2023-02-04 13:15                                   ` Benjamin Coddington
2023-02-04 16:52                                     ` Trond Myklebust
2023-02-04 20:44                                       ` Benjamin Coddington
2023-02-05 11:24                                         ` Jeff Layton
2023-02-05 16:11                                           ` Benjamin Coddington
2023-02-01 15:11   ` Chuck Lever III
2023-02-03 12:39 ` Linux kernel regression tracking (#adding)
2023-02-21 14:58   ` Linux regression tracking #update (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F1833EA0-263F-46DF-8001-747A871E5757@redhat.com \
    --to=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).