Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2682201rwe; Sun, 16 Apr 2023 03:11:57 -0700 (PDT) X-Google-Smtp-Source: AKy350blW6QkJZfLuoRkuSP4QcLXy7PbURihCkEKggO3rVeiUrVf3m6n6YGeXy5Qmnp5tA5ektfC X-Received: by 2002:a17:90b:4b04:b0:247:368a:5813 with SMTP id lx4-20020a17090b4b0400b00247368a5813mr8517247pjb.11.1681639917637; Sun, 16 Apr 2023 03:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681639917; cv=none; d=google.com; s=arc-20160816; b=dEPATbbYERmdsm+t+FBEteNS/ZAjtGwJn4gbbTotIuoz8gtnQ2lbEl/snqK2wg8o/z qCaB/7RMnr3VWjzcg8DD+4dYZSWv4L50HaQfEb/Lx8mfvNNs45ay1/Tljh+sFId+SaZs xfxPnlWzsk9SBWbItfnw65xNR5eZPPRzRYnbSVaXUEPE7G1WlzqnLw4yqFx1Y+qBquVZ 8u73DPM0oSsw3qem7Vncku+3mQMBcDFTlJFkMFpM1sbmZbSSc4MlVbtNHJY5/AcPmzIZ s/hQftB0OtNMtxaZN7Bxr3QogryBr1ROcBjyCitFV2YvzmBZ1WakQvA0Lqf15/p4fnRw G0eA== 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=kVkGglqQXJL0HSWBGNysJgSzk1KzdeL+6lmKJJq9ojbBYnjg0emvKyspiCL9JqfUvd RlAGgtWqflqRi1lZSvHLXKBFNOnyKpgdqVdzMDk8vJPm8qvgBBKnivSWv5WXbNvknCCY lHtG6s4axzGqPeNvm+cZlIButNeUmh9nt93QGHpqWMJ8VguKvmccu1u7TEwqu/Gpk9Yi pNr/HKOVNpmyXbH0z3hZFVHXNlRXHpMDSutCxjw4MSY5h3YAgIIQRF2NSz0zlEEDl6xW h1PeOr3p5Ok6ZOrUK+YBe8iV2hZMKTVL4M7SVDObtujk011SKWxwelMNOJj4oRERpaXb TVCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KxowZcfj; 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 gw6-20020a17090b0a4600b0024662765608si11899909pjb.111.2023.04.16.03.11.45; Sun, 16 Apr 2023 03:11:57 -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=KxowZcfj; 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 S229827AbjDPKJt (ORCPT + 99 others); Sun, 16 Apr 2023 06:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbjDPKJ2 (ORCPT ); Sun, 16 Apr 2023 06:09:28 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F4E019B3; Sun, 16 Apr 2023 03:09:14 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id lh8so9761387plb.1; Sun, 16 Apr 2023 03:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681639753; x=1684231753; 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=KxowZcfjv7AC9b6QebS+yTXkkBqTFQ/4d4wvDU7rzezI+v2XQ9qZamT/QpHEPRIFa+ VlIv06KcbCOAWLATTwi6NEpYekuq70mpmQOyCIF5mWWfcMd0yJYgkfOWUr/74HyMq6Po 82rQtX8n70BUWeHqznFJdJa38HcERKD9zhsLeNIXGoOHrwpoNAc7aQ0GJbBVw2uwxWnd /kx5/78P5/mFNO5gl3njKtL9F8MyReaMKYgk/Ry4wi9d8eY9UxjcelmoK8I1auSG8u8s RUSmDgPSfe8K4Bnwqv/6SMxv8gFivIuQZwpxuY0fnFjlR1b5GhYpzIStkDuk0PvvKl4v jxSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681639753; x=1684231753; 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=cMSXj9jyZJguRQXC0uKdQ2Yh2nMJ9yTFoQkK1rRymsD5zyQ6+tj38073u2jqecJg3t wTo9Y8bzpc6fkX39v6CRnmLM0MhmM7tN/+hO8Uv/ybIhtTkbkfWpLKfBPAHBAgHvTk+d CV3Rh3x6Vehz+tnYrRPcmIA7Gsml3jZcioJS1+9vKUYdeHXUoe93JMFkE8K++USsMelA 57snZqabNtxoLZIlK7wXx9e+lkRBUo8Lx5ZVBlmT04dXCagQvz5VHRRrt0IGWpfGp9Ut H9gQABN216yRugTi/xf6dxmqKbKw0qONYcKfopW0Mu//uFrhlD9+rF6k6aTJ3ksHu7fR fxMQ== X-Gm-Message-State: AAQBX9d6cfBUDnRfvQAt0/c2T8Cu0wPhn/SAPsVkLIKrFAzyZ3nU2IBH taUrMvWmkW8Ok75rsUGyjrNonFUjP1I= X-Received: by 2002:a05:6a20:428b:b0:ee:f290:5b5e with SMTP id o11-20020a056a20428b00b000eef2905b5emr4895247pzj.43.1681639753194; Sun, 16 Apr 2023 03:09:13 -0700 (PDT) Received: from rh-tp.. ([2406:7400:63:2dd2:1827:1d70:2273:8ee0]) by smtp.gmail.com with ESMTPSA id h9-20020aa786c9000000b0063b733fdd33sm3096057pfo.89.2023.04.16.03.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 03:09:12 -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: [PATCHv5 6/9] fs.h: Add TRACE_IOCB_STRINGS for use in trace points Date: Sun, 16 Apr 2023 15:38:41 +0530 Message-Id: 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