From patchwork Mon Jul 29 16:19:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13745292 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 D8C0BC3DA7E for ; Mon, 29 Jul 2024 16:21:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 59A9D6B00A3; Mon, 29 Jul 2024 12:21:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 54B286B00A4; Mon, 29 Jul 2024 12:21:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EBD56B00A5; Mon, 29 Jul 2024 12:21:27 -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 204916B00A3 for ; Mon, 29 Jul 2024 12:21:27 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 940358043E for ; Mon, 29 Jul 2024 16:21:26 +0000 (UTC) X-FDA: 82393305372.17.C375D72 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf01.hostedemail.com (Postfix) with ESMTP id DD22040022 for ; Mon, 29 Jul 2024 16:21:24 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Gofc6sV5; spf=pass (imf01.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.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=1722270081; 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=ym7Dgj5R+YdTfcRYfBpvIxa6W6XwErM+iC1RqazEX2E=; b=8NCv8Mpw/tcGd8oEV6JoOG8XJqpXr1obrdh4gOfEQMCI7D9XrxpV9O60ndNSyYvb996Ieu 0i+fK7DZKHr3gEtzkiLnl766SMmQw11XBrZOHy6LPDs7VYoMr5pcoUBXgyCkCS3V28X/rr 28HvLfpzNcTS52soOe2PVHLTYS4EGS8= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Gofc6sV5; spf=pass (imf01.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722270081; a=rsa-sha256; cv=none; b=fivmquK+7dG8+LF1IMU47U25rvIdk+jd+8mxoKF6eJ7iLFEpGCyGa9elcb7YwgGmlzQF/l G0m5CloomBdrx0yC7QDbwBFs3tcD+FpZvJzfkX8JTXg1roxWvyS//EvF7xrnv4FLpv527z nJCJUHF+Y5JdKAfiB15dXzVe9t0TWiw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722270084; 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=ym7Dgj5R+YdTfcRYfBpvIxa6W6XwErM+iC1RqazEX2E=; b=Gofc6sV5efLcuvRVsCLLjXmK9QXvVRNAX9OTN5nMPh3L9sbfjY23ak4/94ewSLwpAzN+6L M+G0gD/mQPASKmY8Y2m9Otra4KDW/gMUpm3s3uYTZRlWhN/syAcpEl7q+5KF8e6NcdxI/h Toq0eifV2KOOw9P8EE3JoB8KwvJuA6A= Received: from mx-prod-mc-03.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-639-SmDaEKiJM-elKkaE9Ynq4w-1; Mon, 29 Jul 2024 12:21:19 -0400 X-MC-Unique: SmDaEKiJM-elKkaE9Ynq4w-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C04641955D4D; Mon, 29 Jul 2024 16:21:14 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.216]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 23C2C19560AA; Mon, 29 Jul 2024 16:21:08 +0000 (UTC) From: David Howells To: Christian Brauner , Steve French , Matthew Wilcox Cc: David Howells , Jeff Layton , Gao Xiang , Dominique Martinet , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , 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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/24] netfs: Reserve netfs_sreq_source 0 as unset/unknown Date: Mon, 29 Jul 2024 17:19:37 +0100 Message-ID: <20240729162002.3436763-9-dhowells@redhat.com> In-Reply-To: <20240729162002.3436763-1-dhowells@redhat.com> References: <20240729162002.3436763-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspam-User: X-Stat-Signature: syyiw5q43uukrgwxy8y88otssa1k6qds X-Rspamd-Queue-Id: DD22040022 X-Rspamd-Server: rspam11 X-HE-Tag: 1722270084-549101 X-HE-Meta: U2FsdGVkX187l1ZIDBPUrFNsGt3RnzIP3FKbbjFuVLb3xFmXLDn+liAyhYC8N56oET8yI7Jmq/Rd3pomFPpM4/PA0rf6Tri/qa2HTYhSiS6fZVQy6N9hxdDaAihwGP0Zf7Z5GgRTbK8vNKNTIriQu65DknSPegE85bG8ttkOVqCR3858EtWSl5PP04ay3/7kJUAeV9LqZZ4m+YzOqlW8yaPa3IZnXEYtBGRANT9zZdb08GZAJKpuKRLZ9VDv0lxKMev3HTNO09691mM8X0LiTtzhM/O2sxXP1jE8jF8VtaaawmHgPJZb4Ac/zQJ3a9lFKZ9jAYtIuO1D1BXClKF6Cgr+I8WooUfl1qJgqOTCSyyfLJAAHN1BMVfhw+6tGJZxxZgOv6rzey3c6mbybjclUz2/leAala7sPla31afaHxCN4JlThCXed+2i7MPyeZIALNyUTFXMnPA02WZ7q/WspOMaOr1dexFATRTraUDNNZa0Q515aiNpt4RLjcSnmDrOTe4Uj25dh+fKVKIWJNfKwTdzM3G4Oac2ARGWOSCjbNDXOOADvE3hwxJ+rJLXozWSnzOdE0zq4u3gbMx9DARBChJQUJPgpF8KIFCaivW6irUgva+4E0p1wT3rq+w3hqZbzDavjvawG/Gw5YKkbECm/a9ZU6we1miySmUalwrLvYRH4D9s+yIeZp2DbLa1VjKMN4s9zBwNXkyCeHtN4e8TJolSvRxb6MVsXHFsxRvQ3b8bPgODiNHvkfqok6Ii1HTaBGa9jcVUF7+pI8C1wwaNMjuU11Igtj9IiINxDYSF8ahgI8TAPwFrTPzBR7fZy0BuewQuYgk6+W54V/y/zTcniECx+jxn8LwZp2te9ti9Is5dyDr68Svwsogwh69tbtOVpzYedtK+Lt8FqDYFiNXA7bPGZVHhd+tKat6NWHQjWJVZcHI6HJu5hmAxLUGSnziyeFVn9zg7Ln7tm2xJzHO eaXHKMIU FzPC1WiT7b9j8Co2sceIiCgl9IVP/A/jPsGLdweG42G4XZzSC1JwISVHtA/eNSONqZYrR4jMqnvWmU3ir+ShW4EMC3aJ/IdjKfUY2jImne/76FWYcbWeJbFTUCf3H6H8NhaHFJKTndBId5QaGLr5jlP7H/Z5cKl9Wa98cxhi4csznmcN7o6jMGKxjREp4yZcXeXibOCbshdtRUdSiWci7K/pR/lHtaI7ztLjqg9X17XGGm600qJw6j21PcZmuZs9581dyi/9xQSxtD3pxRFUe1fdvUY7yMSrTts/iabHCYjDSxLrxcWbXpoVyPXDI4EJCFijaMwMUiIrInFxE+8KlcPL54M7G9VADW7tNPhfo67cG47kdVi5xu8WRS65vvBjRbaFGKNqioL98XExOFcCfhQ8xTQ== 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: Reserve the 0-valued netfs_sreq_source to mean unset or unknown so that it can be seen in the trace as such rather than appearing as download-from-server when it's going to get switched to something else. Signed-off-by: David Howells cc: Jeff Layton cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org --- include/linux/netfs.h | 1 + include/trace/events/netfs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/linux/netfs.h b/include/linux/netfs.h index aada40d2182b..5e623e52e5a2 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -43,6 +43,7 @@ static inline void folio_start_private_2(struct folio *folio) #define NETFS_BUF_PAGECACHE_MARK XA_MARK_1 /* - Page needs wb/dirty flag wrangling */ enum netfs_io_source { + NETFS_SOURCE_UNKNOWN, NETFS_FILL_WITH_ZEROES, NETFS_DOWNLOAD_FROM_SERVER, NETFS_READ_FROM_CACHE, diff --git a/include/trace/events/netfs.h b/include/trace/events/netfs.h index fc5dbd19f120..bd4f6f1f1040 100644 --- a/include/trace/events/netfs.h +++ b/include/trace/events/netfs.h @@ -59,6 +59,7 @@ E_(netfs_rreq_trace_write_done, "WR-DONE") #define netfs_sreq_sources \ + EM(NETFS_SOURCE_UNKNOWN, "----") \ EM(NETFS_FILL_WITH_ZEROES, "ZERO") \ EM(NETFS_DOWNLOAD_FROM_SERVER, "DOWN") \ EM(NETFS_READ_FROM_CACHE, "READ") \