RE: [GIT PULL] iomap: new code for 5.13-rc1

From: Justin He
Date: Wed Apr 28 2021 - 04:47:23 EST


Hi

> -----Original Message-----
> From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
> Sent: Wednesday, April 28, 2021 3:38 PM
> To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>; Christoph Hellwig
> <hch@xxxxxx>
> Cc: Darrick J. Wong <djwong@xxxxxxxxxx>; Justin He <Justin.He@xxxxxxx>; Al
> Viro <viro@xxxxxxxxxxxxxxxxxx>; linux-fsdevel <linux-
> fsdevel@xxxxxxxxxxxxxxx>; linux-xfs <linux-xfs@xxxxxxxxxxxxxxx>; Dave
> Chinner <david@xxxxxxxxxxxxx>; Linux Kernel Mailing List <linux-
> kernel@xxxxxxxxxxxxxxx>; Eric Sandeen <sandeen@xxxxxxxxxxx>
> Subject: Re: [GIT PULL] iomap: new code for 5.13-rc1
>
> On 28/04/2021 09.14, Linus Torvalds wrote:
> So let me just quote that first reply of mine, because you seem to not
> > have seen it:
> >
> >> We have '%pD' for printing a filename. It may not be perfect (by
> >> default it only prints one component, you can do "%pD4" to show up to
> >> four components), but it should "JustWork(tm)".
> >>
> >> And if it doesn't, we should fix it.
> >
> > I really think %pD4 should be more than good enough. And I think maybe
> > we should make plain "%pD" mean "as much of the path that is
> > reasonable" rather than "as few components as possible" (ie 1).
> >
> > So I don't think "%pD" (or "%pD4") is necessarily perfect, but I think
> > it's even worse when people then go and do odd ad-hoc things because
> > of some inconvenience in our %pD implementation.
> >
> > For example, changing the default to be "show more by default" should
> > be as simple as something like the attached. I do think that would be
> > the more natural behavior for %pD - don't limit it unnecessarily by
> > default, but for somebody who literally just wants to see a maximum of
> > 2 components, using '%pD2' makes sense.
> >
> > (Similarly, changing the limit of 4 components to something slightly
> > bigger would be trivial)
> >
> > Hmm?
> >
> > Grepping for existing users with
> >
> > git grep '%pD[^1-4]'
> >
> > most of them would probably like a full pathname, and the odd s390
> > hmcdrv_dev.c use should just be fixed (it has a hardcoded "/dev/%pD",
> > which seems very wrong).
>
> So the patch makes sense to me. If somebody says '%pD5', it would get
> capped at 4 instead of being forced down to 1. But note that while that
> grep only produces ~36 hits, it also affects %pd, of which there are
> ~200 without a 2-4 following (including some vsprintf test cases that
> would break). So I think one would first have to explicitly support '1',
> switch over some users by adding that 1 in their format string
> (test_vsprintf in particular), then flip the default for 'no digit
> following %p[dD]'.

I checked and found a few changes as follows, hoping I didn't miss else:
1. test_vsprintf %pD->%pD1 %pd->%pd1
2. drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
../../../%pd3/%pd -> %pd
3. s390/hmcdrv as mentioned above

--
Cheers,
Justin (Jia He)


>
> Rasmus
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.