Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2011943rwr; Fri, 21 Apr 2023 03:01:01 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7wZG6R9WmSuOH7SXqTS1sCiK0sQsdOSVA3kNVonq45n7aUDG8lgNFY5swl2JkVt3YmimJ X-Received: by 2002:a17:902:e547:b0:1a9:4e55:dce6 with SMTP id n7-20020a170902e54700b001a94e55dce6mr840436plf.16.1682071261470; Fri, 21 Apr 2023 03:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682071261; cv=none; d=google.com; s=arc-20160816; b=WwlgMNz7DuPJqh161fqYEPoROiTXetAWRzU0LeNcLOwGHURMEbSnU4p5cdkkyIa4By Wf0kp3vcROf5V51+I4ljKRPDpVBj9SEm+DNTvgEOUOQSz0QJMk30OIJSwIKCk27DM9cY GqAzW19EPF2jxkji6n/oXF9HZRdWD36dA0BCjbJLp8YE61x3Adh/kzEHvOj6+1aRlwZO 2U8sh0oSHi2w9b9evyOEGVsWGPSNy9rQnQlxCBg3NWi5/pB1rRGOGepjEW6aDad0pcqt 3egdInx/3nFd3y7oLGdRnEpeDTDQUJwLPW/8UVw67BqleK53pibbfsbxUvFJGPW7zMeC 2zoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OTMdTuJ1OD5jmTv0pV5ODd1Pf3L2FjXJKk2J+PBTNqI=; b=Sou0tqwa99R5VVezHB27vcPrchPDXtditBqNkIMVtcVhOmEBuM/w3f1uy5kX2kkjzB ozJ3YLNAqgGEOSQXRpykFCr/kSy/6zlOHpzJ9Ic+Ij69lFooNkG72nXifrze1bZTs/BD lQByHW0SCChbJJkZoXb5Kk6WPxMEg4Jyjxhdut0uuHT8cDg1iASvf7BdDxcu8TJFf+Qo Be2CdbxvQbD0S2vF96L/j2NIOC3q0+3E/y0sS2D8QJYYLv9jvPE704brSZy1RNN3HV4n CUOC9IpAetXVchTPRFngC1x3lfKxBsFM4bgfYzQ8avBHLtLRbYSlS4NkIcO+rCyaC8Av B+aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=PCpIrgqZ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a170902ced100b001a6f91439d8si2912329plg.393.2023.04.21.03.00.45; Fri, 21 Apr 2023 03:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=PCpIrgqZ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232183AbjDUJrd (ORCPT + 99 others); Fri, 21 Apr 2023 05:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbjDUJr0 (ORCPT ); Fri, 21 Apr 2023 05:47:26 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F9C9B75F; Fri, 21 Apr 2023 02:46:52 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-63b5465fc13so1728818b3a.3; Fri, 21 Apr 2023 02:46:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682070406; x=1684662406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OTMdTuJ1OD5jmTv0pV5ODd1Pf3L2FjXJKk2J+PBTNqI=; b=PCpIrgqZCUGRN3JcfgVN6Hc0kkp1kIA2jwFZwWobvN0EOHw+fKdvaMlMKS/FC8WOj9 z1iTB/2s7eAYb1WDBDZSfqOIaC5LPv2G8bbSNjNLbTUvld71hMxCHk9C3gYvvFzbkYfi eeixEw6HfJzPcKGjyiiO47FWSJwYSNnl8C9K7CXbkRFAvY80VqLZZZfTp7HYF70mGFIN b7SBqSfl5vN/Je8tZcvD1NDj+i9Kd4P+i8Mhsr6KCLf09Wvhy4jp8aG9UN11L5cQ15US ljN0r920G7Ju9J8WG9d6X5pDo7dTvXGRWN843Bpxbfgaol1fDnDQIk6lXoul1FVJk21L DYPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682070406; x=1684662406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OTMdTuJ1OD5jmTv0pV5ODd1Pf3L2FjXJKk2J+PBTNqI=; b=K8S2qCl1Jz92pQlPGHv+lW8e1EXbK7USg+EuqDwhRz9JQ4FcP6x3S6hj/oXGyYkd8V dRg3kEuoS/XHCqZe3d9rQaiveVtne4sO5+dQ0p9GmF4h9pHBSvyMzZUf+siCzZlcShWs OiS6Qm0FvrLORyexnlRyub7TCHtRnCPKJe5n1JBh/PcAB5Ef8jC+dGD8K3jqieqFwLHb 8WADSW9JM4viuNnD1V3Qqc064IrsPq2M6t4sG5OQ4C0lNPExewl10vWlLQQ7TyMSw7m3 XyqohOEE9D3qnxkggE2vGUvty8l/p0hDU5r3eG8vNvnZ60DAqIt4OTqZR4NWmLDcGhsu b0Bg== X-Gm-Message-State: AAQBX9eKlxaeNbk1CHzAK706GYVgPFTw3+q3JZCGCq+gPhm2ojpjXwe0 QUzbYAOefwxo63RPHBsaSJGDrbnFB+g= X-Received: by 2002:a05:6a21:6215:b0:ec:6039:f76f with SMTP id wm21-20020a056a21621500b000ec6039f76fmr4458792pzb.11.1682070406658; Fri, 21 Apr 2023 02:46:46 -0700 (PDT) Received: from rh-tp.. ([2406:7400:63:2dd2:8818:e6e1:3a73:368c]) by smtp.gmail.com with ESMTPSA id w35-20020a631623000000b0051f15c575fesm2295376pgl.87.2023.04.21.02.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 02:46:46 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Jan Kara , Christoph Hellwig , "Darrick J . Wong" , Ojaswin Mujoo , Disha Goel , "Ritesh Harjani (IBM)" , Christoph Hellwig Subject: [PATCHv6 6/9] fs.h: Add TRACE_IOCB_STRINGS for use in trace points Date: Fri, 21 Apr 2023 15:16:16 +0530 Message-Id: <12576fb7b6a9720cc1d5659e95beea948c27907b.1682069716.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Add TRACE_IOCB_STRINGS macro which can be used in the trace point patch to print different flag values with meaningful string output. Tested-by: Disha Goel Reviewed-by: Christoph Hellwig Signed-off-by: Ritesh Harjani (IBM) --- include/linux/fs.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..bdc1f7ed2aba 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -340,6 +340,20 @@ enum rw_hint { /* can use bio alloc cache */ #define IOCB_ALLOC_CACHE (1 << 21) +/* for use in trace events */ +#define TRACE_IOCB_STRINGS \ + { IOCB_HIPRI, "HIPRI" }, \ + { IOCB_DSYNC, "DSYNC" }, \ + { IOCB_SYNC, "SYNC" }, \ + { IOCB_NOWAIT, "NOWAIT" }, \ + { IOCB_APPEND, "APPEND" }, \ + { IOCB_EVENTFD, "EVENTFD"}, \ + { IOCB_DIRECT, "DIRECT" }, \ + { IOCB_WRITE, "WRITE" }, \ + { IOCB_WAITQ, "WAITQ" }, \ + { IOCB_NOIO, "NOIO" }, \ + { IOCB_ALLOC_CACHE, "ALLOC_CACHE" } + struct kiocb { struct file *ki_filp; loff_t ki_pos; -- 2.39.2