From patchwork Wed Aug 28 21:02:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13781958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEF6EC71143 for ; Wed, 28 Aug 2024 21:03:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 481F36B009D; Wed, 28 Aug 2024 17:03:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 430E06B009E; Wed, 28 Aug 2024 17:03:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D1CE6B009F; Wed, 28 Aug 2024 17:03:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 0CC156B009D for ; Wed, 28 Aug 2024 17:03:52 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8108212083D for ; Wed, 28 Aug 2024 21:03:51 +0000 (UTC) X-FDA: 82502881062.20.6ED202D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id 9697E20019 for ; Wed, 28 Aug 2024 21:03:49 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=H84WH5+U; spf=pass (imf13.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724878941; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HnRbucMY226i4IUYHJiuv+7kBNxjZEs05bItUy7sjXs=; b=jTYlUKHAo5o9NQohlKAFrNrhbiQA8WOMlCHw4fNWviz6mwUeLYVPZEUbKkZhEoilhZP9Wj DST5YMBtgRSNUW12U4zzsVV0ePeybVNDRilhhxS61EKKDXKV85eh3Pf5WPTUCukhUoJ/7s rgnNLPKiy0PcsClpWOVD9obXWNHLuug= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724878941; a=rsa-sha256; cv=none; b=o49BsJCJ/T+frStjooAsku7RGNDL3m8gQMwmDR/H6iFix51Z6NKBOcUg1guS/o1gooEy3v 2EQdKDBN1Pq+xVp4uG+JvU9FpAuCE9spAhH7HnooY0bMmvd66zrG/GKEFxZfj/GR7xi0YM mIP24/uyYN6Alpe60tLWwEe+0C4zCd0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=H84WH5+U; spf=pass (imf13.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724879028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HnRbucMY226i4IUYHJiuv+7kBNxjZEs05bItUy7sjXs=; b=H84WH5+UL8UxRRVnpf9p0V5mVablrgZRKX406GqAboL5SOin45CuNKCcuFozUU0bEwRyec qjP2uVZ1VVWKany/0WmjH6KWnSDFP0Vlh/VP0Qsa8NxmknjEhinTRBRoZts5gj88ABxVzg 8NGDYgEtsEK62SYEr0xLuu+d+w+flSo= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-122-iAIpNcUkPheyG0CeJjFQ_w-1; Wed, 28 Aug 2024 17:03:45 -0400 X-MC-Unique: iAIpNcUkPheyG0CeJjFQ_w-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 010F11955BF1; Wed, 28 Aug 2024 21:03:43 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.30]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5B35C1955BF2; Wed, 28 Aug 2024 21:03:38 +0000 (UTC) From: David Howells To: Christian Brauner , Steve French Cc: David Howells , Paulo Alcantara , Tom Talpey , Dominique Martinet , Jeff Layton , Matthew Wilcox , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] netfs, cifs: Improve some debugging bits Date: Wed, 28 Aug 2024 22:02:47 +0100 Message-ID: <20240828210249.1078637-7-dhowells@redhat.com> In-Reply-To: <20240828210249.1078637-1-dhowells@redhat.com> References: <20240828210249.1078637-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By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0NsxqZvZKJwzhUtYyRp8UPNsevuB4qixJ2wdmzT3HJ7OD+abb4 9IaRTSmt dG3Dvh4jNi/nSxsl4EVbrZJ1/HEq0iNo5gc7Lkw9I0CrWtXM1dyFjz5FeKLGpGz9z9dRPmxlGODwT99DeQOZ4go/CqnRjFFuP00tJQrdahAo8n0I4zna8LomTWi6axhjEYMmDKKFawJI8hsde6xdk0V8fk3jkuPNlxcldSoLp5mp1mSe7GRHucdIS7v3YrUvIIu8rEenFidTPzUGXMvXONYDMOPnRw4WP32sO7ZHaakPOzieLpv/CbS5S54ye7fD2BKtRmLFzVRSTWv+ArANBOXbJn9V89bLCl5k7AvD6PVCnrDqpVY8KPk1dVSDMc0ttFiqcFIhxT/NJt0ieizabh0g2uhNwj0Bh1l5WeThlz0//chgRcnr3PrT+/wnqXLje3KDSq8LAFJuIda0bj3xgWUUV/YVuHIjUKZwIwsfnn36cmrusAA6a4SJcg2oSTMdQRuWuZksob4oyaGfEDBHidIGUWnFGn3Y3vYb42lu6PTsLGgt+8cGT+R0V7ki2OJNDKQ50 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Improve some debugging bits: (1) The netfslib _debug() macro doesn't need a newline in its format string. (2) Display the request debug ID and subrequest index in messages emitted in smb2_adjust_credits() to make it easier to reference in traces. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org --- fs/netfs/io.c | 2 +- fs/smb/client/smb2ops.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/netfs/io.c b/fs/netfs/io.c index 943128507af5..d6ada4eba744 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -270,7 +270,7 @@ static void netfs_reset_subreq_iter(struct netfs_io_request *rreq, if (count == remaining) return; - _debug("R=%08x[%u] ITER RESUB-MISMATCH %zx != %zx-%zx-%llx %x\n", + _debug("R=%08x[%u] ITER RESUB-MISMATCH %zx != %zx-%zx-%llx %x", rreq->debug_id, subreq->debug_index, iov_iter_count(&subreq->io_iter), subreq->transferred, subreq->len, rreq->i_size, diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 4df84ebe8dbe..e6540072ffb0 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -316,7 +316,8 @@ smb2_adjust_credits(struct TCP_Server_Info *server, cifs_trace_rw_credits_no_adjust_up); trace_smb3_too_many_credits(server->CurrentMid, server->conn_id, server->hostname, 0, credits->value - new_val, 0); - cifs_server_dbg(VFS, "request has less credits (%d) than required (%d)", + cifs_server_dbg(VFS, "R=%x[%x] request has less credits (%d) than required (%d)", + subreq->rreq->debug_id, subreq->subreq.debug_index, credits->value, new_val); return -EOPNOTSUPP; @@ -338,8 +339,9 @@ smb2_adjust_credits(struct TCP_Server_Info *server, trace_smb3_reconnect_detected(server->CurrentMid, server->conn_id, server->hostname, scredits, credits->value - new_val, in_flight); - cifs_server_dbg(VFS, "trying to return %d credits to old session\n", - credits->value - new_val); + cifs_server_dbg(VFS, "R=%x[%x] trying to return %d credits to old session\n", + subreq->rreq->debug_id, subreq->subreq.debug_index, + credits->value - new_val); return -EAGAIN; }