From patchwork Fri Aug 23 16:12:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13775478 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 66349C5321D for ; Fri, 23 Aug 2024 16:12:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F41246B02E2; Fri, 23 Aug 2024 12:12:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC8896B02EC; Fri, 23 Aug 2024 12:12:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D41DC6B02EA; Fri, 23 Aug 2024 12:12:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AC0C36B02E2 for ; Fri, 23 Aug 2024 12:12:43 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 71314C1E8B for ; Fri, 23 Aug 2024 16:12:39 +0000 (UTC) X-FDA: 82484003238.16.D26D12F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 94D0920025 for ; Fri, 23 Aug 2024 16:12:37 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=L9uhWjlj; spf=pass (imf03.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=1724429476; 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=/lptOZHiOn8uWw0ALny7F0H/3F9qROuXGja+3Wq36Fc=; b=TL/9fxTp3oREFwb0jcJO5nth+Nxr5Y1zcHYlwzX6lhGb6g1KygoDr/is5lL7v0JW1ip1OW Ev6TFijqiseXmibrgsESpie+V2o6HUDr41h92/dU93fs9Ns/yZA0SJ0h/jlWvJ2gxkfKoH pdAKdYHtpzLq/QhsiTRCe0mUKONTg3E= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724429476; a=rsa-sha256; cv=none; b=H/2299FbiGX5UnjNmk+fnrquc9qeUekFE9+IIBgKnjRgYEjiCjPWpvHRQmWBplsSd7eflO t+Bmzghz5miJYwe1R+6n6mSlrj23/aBLHkofRXb6XANYxs8sK+inf+Z7ue8UxdbpC5qM5z 427E8EFcV1bl7qnX4CiYAWvK72MuVns= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=L9uhWjlj; spf=pass (imf03.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=1724429556; 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=/lptOZHiOn8uWw0ALny7F0H/3F9qROuXGja+3Wq36Fc=; b=L9uhWjljXFpKrLT11SS/uoA9MnaHiTcOsxn9IumKavvaBj/MigPz44743LQD5sg719W74Q lmfcWR9GmrkohqI/Tlh8BqhlGvmwJy95woMNmseaqrojXEz2fpfID4iJW/0zhwPQaGSOjy vHWUw+lrO5RuUFdvcoEAzSVVfgOnelU= Received: from mx-prod-mc-02.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-224-zwK_gHXDOoy8ylOCoGXt0g-1; Fri, 23 Aug 2024 12:12:33 -0400 X-MC-Unique: zwK_gHXDOoy8ylOCoGXt0g-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 65F331954B06; Fri, 23 Aug 2024 16:12:30 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.30]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 699EC19560A3; Fri, 23 Aug 2024 16:12:25 +0000 (UTC) From: David Howells To: Christian Brauner Cc: David Howells , Pankaj Raghav , 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, Steve French , Paulo Alcantara Subject: [PATCH 2/5] netfs, cifs: Improve some debugging bits Date: Fri, 23 Aug 2024 17:12:03 +0100 Message-ID: <20240823161209.434705-3-dhowells@redhat.com> In-Reply-To: <20240823161209.434705-1-dhowells@redhat.com> References: <20240823161209.434705-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Rspamd-Queue-Id: 94D0920025 X-Stat-Signature: rpo8affmamdte465pueoz9t4o8p7ndos X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1724429557-581947 X-HE-Meta: U2FsdGVkX18s7GQQo1/hWt/ydjW1eQt1JZ1JWz/kicn0IASjVW6YWZXfMKbzGWXMqsGZMMVojkRBl+R+MJJq64BmDCGp/aCNxvDHR62UXkNWMg9JhLg++OL/hRe2sEfpdkibwmL62J357lK5Xdx8ozKob9VwPrnAZxp3LtX0jDDft5/FJqXP1s71ZDSnAc2umzIb1EjAMSq22xCm76fm5ZqzYpkVbo4VJWzLPV/WPxr4KG3E7q59dbULpnZu5FCkbo7fA1DVta5VZEwsCzjIlk1HtGDDbttDyOMNkHkJA03m7/0iuRThWvxAooIHm/A9w3XiRnInIbqWqkYyAGkx3uq+ed3C3z4IkHh3CTeA+ROpCCIZyeL1E/Syu7qVEe0p/1bCcXjLy3jpfmKhLrT4mitBHe2EYy6ZAy/EnJfgozqA7O/C8EDbCIrnMs7aSIKwoyCYH6ddoqGl/A/DOEWRqyBY4a9THDTsa5pwyBOsDCzXhQZ15O2laVAZxANWt1smg+/7YeT782GgrmrfuL99vrw3r6Me1udkZ1gEr1h/CYNtBK1ao2Q45Im0c1KWgslExWdu5P/ebhqECd8s1voz1WcPOowQhwznGLQn7e0hgtYClsj1kQ0rl+NTKbZQ55WKw6mxMQbq9ES0rwbd5m0b4pUfLEEKxhr6u8OCE3b77oZxlQwwIvuyTR17fkwtyBFKZXwBvqQDVUaNy66C3pknFwTdzqXF0AgJQfKE30xnBs0dwy+3BKeqnbF8pC2v7uvsjh7TlzLmsgsWE3RGKScpm8w4ZMoM86PVMMt/FTgs2/2JJkcT9JcZKQmGVtFiX3boH9zCDc+IApYRhNShaprO4/srbr1qtvYg5QIxS5B/EGNTfjqSsl39Ej70hjmgsbNs+i+WVNmGmOQEBoSk9iOQNUbwhfZaVGWlbWOVOZ30NIlFnCKXhoYjdM1gg8MRiY1ZmxXFLzXjLhs7dsxAmp7 lPyGmR3i tyj5MjsYWunBWPCcHRzfXjghiVYobEuZYMePyLPdqPGH2B6BX7xSUmduJaBRwtNbzN9SdQhh9iWRf9I2KBTCtb9lxknSmPXHEfoSt9Jc7VYV6R4KnIFD+txGe7qagXzSABeVODua+vw1JbQkuBzynYlzZXL1D/Z+kXYedcpiJ5PJvgdtr5VxzGWZA+uTaFOik4wjjGnE2AQWFRlg9Nu7YlC8lSg1vBvj3wn/wQ0Wz4DGuNqfum6g6YQLgdqpeaCEx59yFVn2ZNribAUvTtTj29RfdDk23Yku6W4eoC4whzoot4405SWm21JcZxGER0YwB4k9BhIIwPlbiIstRodZ838TmjF072NAJVZvGQJrT84+xw2qS2eNSX3vVo0xUhUCJcTqMo/KKNu6wzWLvgueTHNRH5ArFU1Z+uyyRCMObzM6iZVTWdPGFBSicyMlgJvZVIpZ/IFbKpO7sbp9HSrMTqc8DzyDIyjHai46r 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 d6510a9385dc..605b667fe3a6 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 763a17e62750..20e674990760 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; }