All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Chuck Lever <cel@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christian Brauner <brauner@kernel.org>,
	Hugh Dickins <hughd@google.com>, Jeff Layton <jlayton@redhat.com>,
	Tavian Barnes <tavianator@tavianator.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH v3] libfs: getdents() should return 0 after reaching EOD
Date: Sun, 19 Nov 2023 21:14:15 +0000	[thread overview]
Message-ID: <20231119211415.GB38156@ZenIV> (raw)
In-Reply-To: <46914DA1-E529-43FD-97B6-F995AD933156@oracle.com>

On Sun, Nov 19, 2023 at 08:22:30PM +0000, Chuck Lever III wrote:

> lockdep assertion failure
> 
> Call Trace:
>  <TASK>
>  ? show_regs+0x5d/0x64
>  ? offset_dir_llseek+0x39/0xa3
>  ? __warn+0xab/0x158
>  ? report_bug+0xd0/0x144
>  ? offset_dir_llseek+0x39/0xa3
>  ? handle_bug+0x45/0x74
>  ? exc_invalid_op+0x18/0x68
>  ? asm_exc_invalid_op+0x1b/0x20
>  ? offset_dir_llseek+0x39/0xa3
>  ? __pfx_nfs3svc_encode_entryplus3+0x10/0x10 [nfsd]
>  vfs_llseek+0x1f/0x31
>  nfsd_readdir+0x64/0xb7 [nfsd]

Lovely...  Said that, file here is thread-local, so all accesses
to it are serialized.  The same file has ->iterate_shared() called
without ->f_pos_lock a well...

So that's whatever serialization between ->iterate_shared and ->llseek,
really; for normally opened files that's going to be on fdget_pos()
in relevant syscalls, for something private it's up to whatever's
opened them.

      reply	other threads:[~2023-11-19 21:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18 19:33 [PATCH v3] libfs: getdents() should return 0 after reaching EOD Chuck Lever
2023-11-18 22:11 ` Chuck Lever
2023-11-18 23:36   ` Al Viro
2023-11-19 19:18     ` Chuck Lever III
2023-11-19 20:22       ` Chuck Lever III
2023-11-19 21:14         ` Al Viro [this message]

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=20231119211415.GB38156@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=hughd@google.com \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tavianator@tavianator.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.