RE: [GIT PULL] iomap: new code for 5.13-rc1
From: Justin He <hidden>
Date: 2021-04-28 08:47:23
Also in:
linux-fsdevel, lkml
Hi
-----Original Message----- From: Rasmus Villemoes <linux@rasmusvillemoes.dk> Sent: Wednesday, April 28, 2021 3:38 PM To: Linus Torvalds <torvalds@linux-foundation.org>; Christoph Hellwig [off-list ref] Cc: Darrick J. Wong <djwong@kernel.org>; Justin He <redacted>; Al Viro [off-list ref]; linux-fsdevel <linux- fsdevel@vger.kernel.org>; linux-xfs [off-list ref]; Dave Chinner [off-list ref]; Linux Kernel Mailing List <linux- kernel@vger.kernel.org>; Eric Sandeen [off-list ref] 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 notquoted
have seen it:quoted
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.