linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Justin He <Justin.He@arm.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Christoph Hellwig <hch@lst.de>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Eric Sandeen <sandeen@sandeen.net>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: Re: [GIT PULL] iomap: new code for 5.13-rc1
Date: Fri, 30 Apr 2021 11:58:32 -0700	[thread overview]
Message-ID: <CAHk-=wjzBbEdpteXfRp6-WPKkZBZ1dtJSir0YqSKb_qi8AghuQ@mail.gmail.com> (raw)
In-Reply-To: <YIt3uKBQnlxHAo/Q@zeniv-ca.linux.org.uk>

On Thu, Apr 29, 2021 at 8:21 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Just what does vfsmount have to do with rename_lock?  And what's the point
> of the entire mess, anyway?

Currently "%pD" doesn't actually show a truly valid pathname.

So we have three cases:

 (a) __d_path and friends get the name right, but are being overly
careful about it, and take mount_lock and rename_lock in prepend_path

 (b) dentry_path() doesn't get the actual path name right (only the
in-filesystem one), and takes rename_lock in __dentry_path

 (c) for the vsnprintf case, dentry_name() is the nice lockless "good
for debugging and printk" that doesn't take any locks at all, and
optimistically gives a valid end result, even if it's perhaps not
*THE* valid end result

Basically, the vsnprintf case does the right thing for dentries, and
the whole "you can use this for debugging messages even when you hold
the rename lock" etc.

So (c) is the "debug messages version of (b)".

But there is no "debug messages version of (a)", which is what would
be good for %pD.

You can see it in how the s390 hmcdriv thing does that

        pr_debug("open file '/dev/%pD' with return code %d\n", fp, rc);

which is really just garbage: the "/dev/" part is just a guess, but
yes, if /dev is devtmpfs - like it usually is - then '%pD' simply
doesn't do the right thing (even if it had '%pD2')

              Linus

  parent reply	other threads:[~2021-04-30 18:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  2:58 [GIT PULL] iomap: new code for 5.13-rc1 Darrick J. Wong
2021-04-27 19:40 ` Linus Torvalds
2021-04-27 19:57   ` Christoph Hellwig
2021-04-27 20:05     ` Linus Torvalds
2021-04-28  6:17       ` Christoph Hellwig
2021-04-28  6:38         ` Linus Torvalds
2021-04-28  6:41           ` Christoph Hellwig
2021-04-28  7:14             ` Linus Torvalds
2021-04-28  7:38               ` Rasmus Villemoes
2021-04-28  8:47                 ` Justin He
2021-04-28 16:50                 ` Linus Torvalds
2021-04-29  6:39                   ` Rasmus Villemoes
2021-04-29 16:45                     ` Linus Torvalds
2021-04-30  3:17                       ` Justin He
2021-04-30  3:21                         ` Al Viro
2021-04-30  6:13                           ` Justin He
2021-04-30 18:58                           ` Linus Torvalds [this message]
2021-04-30 18:50                       ` Eric W. Biederman
2021-04-30 19:02                         ` Linus Torvalds
2021-04-29  6:43               ` Christoph Hellwig
2021-04-27 20:07 ` pr-tracker-bot

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='CAHk-=wjzBbEdpteXfRp6-WPKkZBZ1dtJSir0YqSKb_qi8AghuQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=Justin.He@arm.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=sandeen@sandeen.net \
    --cc=viro@zeniv.linux.org.uk \
    /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).