Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1529692rwe; Sat, 15 Apr 2023 00:47:19 -0700 (PDT) X-Google-Smtp-Source: AKy350ak0FgFtxt7l66feUZvLpAxs6L2vBEpVvzGhwucCmx2WvP4LrdW+HVkFKuyGD9bnTrUJvTN X-Received: by 2002:a05:6a20:8f29:b0:ec:96f8:4830 with SMTP id b41-20020a056a208f2900b000ec96f84830mr8968576pzk.0.1681544839540; Sat, 15 Apr 2023 00:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681544839; cv=none; d=google.com; s=arc-20160816; b=YDmBZ8ipcR5De/4LlFFowq4YIV32MnTspbSDNAAWGxgHzkCTl9AmakrTVyIWxs9Q1Q 3dR5GIF/+pdKCvJKn1VqE+ER84q/XjPvbrEzDe1OZvA5I90KGxiRT+G/YS8BsQXCj4aC dLLyvqMPqYxD5wcobetmt06iyr1HBWVFoflOOoTmCo3wnYKx01zPhsqZhfzAIcHB2fLO 3WwpYS5hVVHDIyDvaFOcvHdQTeSUOp3iqiiEoI8BxwacRxm02+cDti1Jf1gpkOlGOihP JVKbxPegf0rz6lom8ZWrnxT4VQP0TIMkXDWX7Yhuz8Buo3dk3ycE90JsADvh6J0T47ix 9kvA== 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=wJ4529+ASIoASFxCV4NfTYtLd6XSwWAq4LnRqRQawP+3Vs6tAhDfoE5RFTdO1EaKTS 7h65ryU7a+V6wjIeYYnHSO6G3qqL5jCv0jhp+41XGThkJ8ABObVLSQ8BrvG3A+Mr1I7I aNjjjC8LLt0OmD3UQz73SHmKnK4QSFas5eNZPNtgKp9eCg9ot2RgO26+CvKTL5rHqwDh e6t0+Rj2hb22Gf9I7pLSm9v0nEfHrKA3C5NMkvyVavgQWgPv8z/r/uZ0WtcXivdjM8f2 vIAOwSppdXXHXOeF4dzhGYnMCD8h6G6PQ081lRlN/Fjb7c8rGj7sCd9kpWGozatVk06i 8pyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jFOFwyy3; 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 36-20020a631564000000b00502f0ddd50bsi6617930pgv.382.2023.04.15.00.47.05; Sat, 15 Apr 2023 00:47:19 -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=jFOFwyy3; 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 S229893AbjDOHpI (ORCPT + 99 others); Sat, 15 Apr 2023 03:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbjDOHo5 (ORCPT ); Sat, 15 Apr 2023 03:44:57 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 328E49019; Sat, 15 Apr 2023 00:44:56 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5191796a483so1160065a12.0; Sat, 15 Apr 2023 00:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681544695; x=1684136695; 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=jFOFwyy3sNBSjRqyH8M3Jqs/3hXDZqy8ajlKuvzqmJkgjkToo1Gjc0MAkYwRDoQyie yyc8BRv/p7of6b9bZHML22pTs/1QlJpZdgiQaJW9CwqgR+SEAWCYXe0G+xbq0d7+D44p Klpn4kESSoD9DmhBGURLb4INlfBzOX9+0U46Efp7U9OIiM7ye7ELHSJJ0zTD2/3fbNOh 0e7lhEnDVIBXE1fEyOOkGTIZz6/Xe1zMoTu1ePMEfK+kIhKS8ndLrawjqHRT9/f/WfFh 6olmKY2bxsyBx+lUKrinF/VsEYsacf1ywLKilq7hl7lnCZsKX95naIKOPq77RyR1qCop dgsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681544695; x=1684136695; 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=fCmNyukooK3e0MlAnxbHXKIbq0MTtBKjKI61uYz2aG+DCyelTDNGA2S96HXw7ymL5v v/yNs48tnAxYSCrHBqvGcPzg+EqvpOLa7HDQXl8WnzNqdrPAIMtUmMMksesevYzu2PlZ lXXyR6O2Pnd4QfmMwbVSZ3/MAmm5Mkrsy83dXpjA24qNpOEeKZno4/2xoNEOgM1w++V/ C2LTL0ZQ5cenS24sJbhQWirtQoQVrAyE9CU0U38xdTgX4HSZMdD8TImgQyt+2AYX1vXo /9h187RRIHFDmQk91ZDTADd9dmX1Qs1uoVG7oJuRl8RY70rqE6VbU5cZT/toB+NzdY0M K3wg== X-Gm-Message-State: AAQBX9exXaRjvgtmqg37Zy5mRU0Qr8W+GGAQAULFuncam+EiAPJxBg6m 668IkZhSqXk9Fty0hVFB7ryfemOXUeY= X-Received: by 2002:a05:6a00:b50:b0:633:490f:a18b with SMTP id p16-20020a056a000b5000b00633490fa18bmr11676202pfo.23.1681544695389; Sat, 15 Apr 2023 00:44:55 -0700 (PDT) Received: from rh-tp.. ([2406:7400:63:2dd2:1827:1d70:2273:8ee0]) by smtp.gmail.com with ESMTPSA id e21-20020aa78255000000b0063b675f01a5sm2338789pfn.11.2023.04.15.00.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Apr 2023 00:44:55 -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: [RFCv4 6/9] fs.h: Add TRACE_IOCB_STRINGS for use in trace points Date: Sat, 15 Apr 2023 13:14:27 +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