Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp121051pxu; Tue, 5 Jan 2021 06:46:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyK/sgR0dH76ZBFzigENJjXpizxduDI3BB4SJ/e3ZY6oDNoTXOZZIWyNR/aZ3RW7tVDYj4 X-Received: by 2002:a17:906:81d6:: with SMTP id e22mr72168538ejx.476.1609857968973; Tue, 05 Jan 2021 06:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609857968; cv=none; d=google.com; s=arc-20160816; b=FbCsquOjXcSSs1+vM8yrEVAPsfQIhP2kxxoWaVCSzOlefuSl7gHwoPbG/6v4IdrMD2 yD2XzkczrHrCi5L8TPP5+yQwydOrr0pgUP7wqNnTS0ct4RLeGZ3n9XK1euLlkv9xo8aQ svmt4kI/jW5IWdqFf/dQHKliKPEvX376TJjs+I52Ra4e/LATYsYv0EgoGqC7mjPvW0E6 mV+R6wWXTt7FSfbG1L8fjr7bCiAxUjYGTEGvKXDOE2YgWMSsWGN2zCENyeMJjuTq3BjA 9yUvAaldg+mUmy6/fpElnNTrDIJGKES2CKLBXLryWdZmTmKeYQDuqLWTQbQVWit+/iIn Dtow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yXFhB2iyx6hjWz/E/UcH4G+PRucSIF/NqnWLe1xbZ1o=; b=UJDyOMwtee2Z5L0QKf1V4FliPIVUwMXNYEqiLrhJAjko5xX0oqHNNW9+TNcE4XxCUy lnJ+Cedj4EHuzUApzDRQjtc5DM+oqb2c6YmCnHGeEwPIbz9YIliDsHGe+OldudKcjnND 0ogyAHoIsXllDHpl3S7N6TzmHAn5UPzRuiMtv6oc1AwGIAXXCHVHnK3OJzU7diGxg15g r2TI/O9m9PD1KaIiSDAXU9VqpP+EEj2Cb/owhiJ9rS7J2DRflRzPQnKOEyudmtEqAyue /H2mNol5R5o5OhoNz55kqJmkal/kSgiyJsfQ/Rrek9i1zMed06v4k4dk5kpljOWANMyd ucUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c5aE+20x; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si35303939edr.365.2021.01.05.06.45.47; Tue, 05 Jan 2021 06:46:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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=@redhat.com header.s=mimecast20190719 header.b=c5aE+20x; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727347AbhAEOls (ORCPT + 99 others); Tue, 5 Jan 2021 09:41:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36129 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbhAEOls (ORCPT ); Tue, 5 Jan 2021 09:41:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609857621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yXFhB2iyx6hjWz/E/UcH4G+PRucSIF/NqnWLe1xbZ1o=; b=c5aE+20xdgCH6K/IytmxXa3DElbK7l02hOXHXBFadVKxfi5UOAMCjFbiGPp4OkikwRXxXS R9Vss0EHPDrb3eN0s6jkTVSfv0fPZCT3deukjBkG2T6QYFmLb4K83cYVEiaQ91EUd/oUOH qrE1yid3UqK4nWIgjAUywaiwh1GNVAo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-D7jFd9XXPAiFftboI8MEXg-1; Tue, 05 Jan 2021 09:40:19 -0500 X-MC-Unique: D7jFd9XXPAiFftboI8MEXg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE40E801817; Tue, 5 Jan 2021 14:40:18 +0000 (UTC) Received: from [172.16.176.1] (ovpn-64-66.rdu2.redhat.com [10.10.64.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31F5610016F4; Tue, 5 Jan 2021 14:40:18 +0000 (UTC) From: "Benjamin Coddington" To: "Scott Mayhew" Cc: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH] NFS: Adjust fs_context error logging Date: Tue, 05 Jan 2021 09:40:17 -0500 Message-ID: In-Reply-To: <20210105135432.1605419-1-smayhew@redhat.com> References: <20210105135432.1605419-1-smayhew@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 5 Jan 2021, at 8:54, Scott Mayhew wrote: > Several existing dprink()/dfprintk() calls were converted to use the new > mount API logging macros by commit ce8866f0913f ("NFS: Attach > supplementary error information to fs_context"). If the fs_context was > not created using fsopen() then it will not have had a log buffer > allocated for it, and the new mount API logging macros will wind up > calling printk(). > > This can result in syslog messages being logged where previously there > were none... most notably "NFS4: Couldn't follow remote path", which can > happen if the client is auto-negotiating a protocol version with an NFS > server that doesn't support the higher v4.x versions. > > Convert the nfs_errorf(), nfs_invalf(), and nfs_warnf() macros to check > for the existence of the fs_context's log buffer and call dprintk() if > it doesn't exist. Add nfs_ferrorf(), nfs_finvalf(), and nfs_warnf(), > which do the same thing but take an NFS debug flag as an argument and > call dfprintk(). Finally, modify the "NFS4: Couldn't follow remote > path" message to use nfs_ferrorf(). > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207385 > Signed-off-by: Scott Mayhew I hope someday we can convert all the old debugging to tracepoints. I know you considered just removing the debug lines or converting these to a tracepoint and decided to fix what we have for now. It does make for a better stable fix. Reviewed-by: Benjamin Coddington