Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp129661pxy; Wed, 28 Apr 2021 00:39:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN03nEK0f4yx93qhnWvOCZ33pZXmWvzjbmXA8Tqqludt7jBYyNTul5g5fkn0eycQQM4fNk X-Received: by 2002:a63:ea06:: with SMTP id c6mr25985727pgi.401.1619595565063; Wed, 28 Apr 2021 00:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619595565; cv=none; d=google.com; s=arc-20160816; b=YIp4nvHurhbRZCH6uSDmxJcGXqioG1foUPkf5dfGNsAhIJPe0O4E+0EKtZ7mUkODnT 1n7Q8viKfcVyEYzn1acMSYX2/Jku8sV58P79OHx33C9NAPPxVgg6LTZFsMyfF09mGUGy sYDP8YTJZt2/ZVo/X6JKYyT9srFkWkkTZvRkVg/Aftc7r0lkG7wqhDkJUB2NNKGDG6Nm ujgqr/AEMry+P8fBuXMOk8Cyf5NsnbrnuxzeEqcbCFW+ItaLHa0ddjk0FX9Pe0ZkoJoP 6X2Q0i6tVyF9e90ahGwS51YfOpkNJH4hPJ1FwXVzemVldKWD2eBb+hsyb/0ZWx5H+u4o famA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=AR7AZx/HprhMaXntKpX52HDvu0W5Gy7xNQSVkuB/z5U=; b=O8xUN8IJeET7moB60xqPKpR7627Cw2OkM1O20GqfEi0GctiHnsRD0ppDH5og2mqjk+ WfH3Akr7JZFy+T34hvcxwt58rPY0sVpZv/3QKRMlhIWqQ0zR4eMUqx6c6TmsV+N8cBeB Jsiqgis+AJErGpY9QmRrShf6IEzHcWv7wAUyMFnvO9L1mUv5swSD8CtXowakNrbjuuAA 22Er54BMOEO23cuRZtST1O1Ktab7su8WbqIobd8rjMCUnLu6eCJThyx6KDKmaKz7Jqqk f9DLmayCMM7WOAyamlEfALiQPEu14aE61s0avX2EIu/RMH9gjauYiZ06hxdPqlBuNfMZ pkgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=P76X46Fh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si4609025pjm.118.2021.04.28.00.39.12; Wed, 28 Apr 2021 00:39:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=P76X46Fh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237021AbhD1HjR (ORCPT + 99 others); Wed, 28 Apr 2021 03:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236787AbhD1HjA (ORCPT ); Wed, 28 Apr 2021 03:39:00 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8832C06138B for ; Wed, 28 Apr 2021 00:38:13 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id n2so93134668ejy.7 for ; Wed, 28 Apr 2021 00:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AR7AZx/HprhMaXntKpX52HDvu0W5Gy7xNQSVkuB/z5U=; b=P76X46Fh530DkQZbz7+8vDw89K1PJ3fhVkrYy3zt/17O7p7VwyCS2OknSWC7pDVkRi ugNNmpVmi220g8sTiWh5rGxJLjez6tgjsrlsXH/Qf69c9989+Ytae5aWs+YWbf6I1rgp ub8hnylXAiKCXGjL7rYeTVbUqdMbO/58Yyh6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AR7AZx/HprhMaXntKpX52HDvu0W5Gy7xNQSVkuB/z5U=; b=HBxP9IWwRS8Sfrq/9WkwifARE9W6yXjmoefj0Zbf++BnkRyAtHrPsAWbY8Ap+5cZgw EZ61bL/aa+ZHZGVISqxoAQzFEOb70P6xQBje2b5vs99iCVr3PwJq05axD9H+1drsWSl3 2tf1DeQEAodTRKDhEmLLsMKFfXKIxYq0jdx2zsN6bPdj1Kd+mfJJX4CmNYacYc23Jr7z KVQwSpLXSD9R3GXx1CL7PIsQT55GDInqET5WvWnU5njUCj0PHfvWBsIR+mDXztVSDtRJ GohzgU7D1GqowXVtYvRfuoiN7IT7Db5OiBCdp63O24zdrpBzEpCxbeju/4Kasc/7nyw7 3Z6g== X-Gm-Message-State: AOAM533rtTJGZRJh6lRouO+i2EtFEmJUf96amM/0fmxcMWqT89XptFqP 3xq1xDVyiYktqNKAQQpSH8s5gThfMQS2oxLm X-Received: by 2002:a17:906:48c6:: with SMTP id d6mr27065165ejt.376.1619595492580; Wed, 28 Apr 2021 00:38:12 -0700 (PDT) Received: from [192.168.1.149] ([80.208.71.248]) by smtp.gmail.com with ESMTPSA id j16sm4205265edt.39.2021.04.28.00.38.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Apr 2021 00:38:12 -0700 (PDT) Subject: Re: [GIT PULL] iomap: new code for 5.13-rc1 To: Linus Torvalds , Christoph Hellwig Cc: "Darrick J. Wong" , Jia He , Al Viro , linux-fsdevel , linux-xfs , Dave Chinner , Linux Kernel Mailing List , Eric Sandeen References: <20210427025805.GD3122264@magnolia> <20210427195727.GA9661@lst.de> <20210428061706.GC5084@lst.de> <20210428064110.GA5883@lst.de> From: Rasmus Villemoes Message-ID: <1de23de2-12a9-2b13-3b86-9fe4102fdc0c@rasmusvillemoes.dk> Date: Wed, 28 Apr 2021 09:38:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]'. Rasmus