Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp593933pxy; Fri, 30 Apr 2021 11:51:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyESSEls7jwuC/L1FWoIcjztqdtvZpY9ZmRndHwec99JcesbZCcqXPbgkm6H3tYWUX8DSsz X-Received: by 2002:a62:5c6:0:b029:24d:e97f:1b1d with SMTP id 189-20020a6205c60000b029024de97f1b1dmr6569389pff.40.1619808694632; Fri, 30 Apr 2021 11:51:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619808694; cv=none; d=google.com; s=arc-20160816; b=v3gtATuXSzIACNv/Jrj5U3MsEV0O+3h3PrNaFuCaBB9hpDlFNAUwG1bn1bkZ+nuQmn hp5mstV8NZXA374X5h8EMSvEPDt2/93oCPAfcf3pnvtmnXvjhHXuKh80fIrRJ5n9vLAy P4mVQkER27ppsG8He3irMwH+S587yTtslYbrBTdQ3xYqs4tZAQP2F0iyS+1uZA5ZNtSa EYmFDp2MOFEpk13CfHlw8LFk0DJG1+pT2b7or27D1tyscDHzIIXrg44vDRcWNQ90ezt2 vomJLQGw9XVoD7Sypob+Lxdl9NwgC0ISbBvWbFAM6xZLW54gyqcQA8R1rr+AHv1DioQz XM9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:mime-version:user-agent:message-id :in-reply-to:date:references:cc:to:from; bh=J9JFUQ7ugZp12GZ/gQyeAO7h3nhigycE5IoBMQIy1Nc=; b=mdFi7epESgFxcCjMrfbQyURU8U2w77p3EzCPXHxbblwFSVEHDRFk6/mTIgxaoqWnVJ qninu2vLCRy+nI3l9qkd95ERFlGdC4epvae+FkfxGVAnvLZFIePDUQY0Cm3IFEN02gcV nEIUr+Qp5tPQuxbznXw+RNhAJFrlgWJBxEXGUbWZxLzNRZvuxhyw9CbI5+esND5SFY51 dSdatrKcHv/7YpaYBCDMmireEOAeAKxBMpniCRBhEkJdAH0N0ddPQWMmD80lGiq/qEBU jzEWXfYkKSqy8Fd1bXc2wLWaNNowdoz/cKa5x9ZikjkYdwVfmebEdvvxv/SoVBPcSI1w W7mw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mu11si3709428pjb.11.2021.04.30.11.51.22; Fri, 30 Apr 2021 11:51:34 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231234AbhD3Svb (ORCPT + 99 others); Fri, 30 Apr 2021 14:51:31 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:40710 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbhD3Sva (ORCPT ); Fri, 30 Apr 2021 14:51:30 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out03.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lcYDm-003rGS-Ol; Fri, 30 Apr 2021 12:50:38 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=fess.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1lcYDl-0005XY-Ur; Fri, 30 Apr 2021 12:50:38 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Rasmus Villemoes , Christoph Hellwig , "Darrick J. Wong" , Jia He , Al Viro , linux-fsdevel , linux-xfs , Dave Chinner , Linux Kernel Mailing List , Eric Sandeen , Andy Shevchenko References: <20210427025805.GD3122264@magnolia> <20210427195727.GA9661@lst.de> <20210428061706.GC5084@lst.de> <20210428064110.GA5883@lst.de> <1de23de2-12a9-2b13-3b86-9fe4102fdc0c@rasmusvillemoes.dk> <26d06c27-4778-bf75-e39a-3b02cd22d0e3@rasmusvillemoes.dk> Date: Fri, 30 Apr 2021 13:50:34 -0500 In-Reply-To: (Linus Torvalds's message of "Thu, 29 Apr 2021 09:45:39 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1lcYDl-0005XY-Ur;;;mid=;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18agHbZHv9HW27hzebg3yTrw+mKNECNwgo= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa05.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, XMSubMetaSxObfu_03,XMSubMetaSx_00 autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; Body=1 Fuz1=1 Fuz2=1] * 1.0 XMSubMetaSx_00 1+ Sexy Words * 0.0 T_TooManySym_01 4+ unique symbols in subject * 1.2 XMSubMetaSxObfu_03 Obfuscated Sexy Noun-People X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 329 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 10 (3.2%), b_tie_ro: 9 (2.8%), parse: 0.83 (0.3%), extract_message_metadata: 12 (3.7%), get_uri_detail_list: 1.17 (0.4%), tests_pri_-1000: 5 (1.6%), tests_pri_-950: 1.01 (0.3%), tests_pri_-900: 0.85 (0.3%), tests_pri_-90: 75 (22.8%), check_bayes: 74 (22.4%), b_tokenize: 6 (1.8%), b_tok_get_all: 8 (2.5%), b_comp_prob: 2.2 (0.7%), b_tok_touch_all: 54 (16.3%), b_finish: 0.80 (0.2%), tests_pri_0: 212 (64.4%), check_dkim_signature: 0.54 (0.2%), check_dkim_adsp: 1.91 (0.6%), poll_dns_idle: 0.64 (0.2%), tests_pri_10: 1.84 (0.6%), tests_pri_500: 7 (2.2%), rewrite_mail: 0.00 (0.0%) Subject: Re: [GIT PULL] iomap: new code for 5.13-rc1 X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Wed, Apr 28, 2021 at 11:40 PM Rasmus Villemoes > wrote: >> >> > That also does explain the arguably odd %pD defaults: %pd came first, >> > and then %pD came afterwards. >> >> Eh? 4b6ccca701ef5977d0ffbc2c932430dea88b38b6 added them both at the same >> time. > > Ahh, I looked at "git blame", and saw that file_dentry_name() was > added later. But that turns out to have been an additional fix on top, > not actually "later support". > > Looking more at that code, I am starting to think that > "file_dentry_name()" simply shouldn't use "dentry_name()" at all. > Despite that shared code origin, and despite that similar letter > choice (lower-vs-upper case), a dentry and a file really are very very > different from a name standpoint. > > And it's not the "a filename is the whale pathname, and a dentry has > its own private dentry name" issue. It's really that the 'struct file' > contains a _path_ - which is not just the dentry pointer, but the > 'struct vfsmount' pointer too. > > So '%pD' really *could* get the real path right (because it has all > the required information) in ways that '%pd' fundamentally cannot. > > At the same time, I really don't like printk specifiers to take any > real locks (ie mount_lock or rename_lock), so I wouldn't want them to > use the full d_path() logic. Well prepend_path the core of d_path, which is essentially the logic I think you are suggesting to use does: read_seqbegin_or_lock(&mount_lock, ...); read_seqbegin_or_lock(&rename_lock, ...); A printk specific variant could easily be modified to always restart or to simply ignore renames and changes to the mount tree. There are always the corner cases when there is no sensible full path to display. A rename or a mount namespace operation could be handled like one of those. Eric