Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2440982rwr; Fri, 21 Apr 2023 08:57:22 -0700 (PDT) X-Google-Smtp-Source: AKy350aO6GUVJeSl5D+D6jru+uRWbwKLp/RJco6yYVH5b7LdH0u9k3sR9a9ElQkto1a9qGWie/HB X-Received: by 2002:a17:90b:d8f:b0:246:ee1d:b4d6 with SMTP id bg15-20020a17090b0d8f00b00246ee1db4d6mr5627514pjb.41.1682092641939; Fri, 21 Apr 2023 08:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682092641; cv=none; d=google.com; s=arc-20160816; b=OXpGj8h+/SO05mAr5/upzwsCyu2gObq+DxocQI6+KECOlVQ0K9tJGZhoWJlmwUIOPQ A4W92D9HCnGVQrDNY8r7lZJbweQ6VpgIkSWePhkXTT3RkwEuV439fQjpCaZfDAeg3uEw dkYl5373brdVuMmx5+7XyTozlnPXme+MwImXrQkPE4oNbNU7JdUd3LrTUfUBURp+mZST KrRtZEeRRmh1m1OVo9wge6w3oSdd2/ZFbG6BXxRJvIBRxeBVPG0INOsU9vfu9C+QOObu sNOdDlwzQRg1LFp9nbxJ9jCUtWzTGxdI0pARWP51Aw6pag9TKvDV6Y+F9y7eJrBzF73T u93Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6Zi2Oees3emCEg8gPWFHu3G9rPeXZZaUD5SfVOr+NKg=; b=cGDafQUlIxPT3vFLFCRQs9cUcfrVvGkcXlUgFoMCnjDWLrog7WS+3i5Vg9GN5xCAUw 4+Wyu6PvVBM5zBqimCTkrIt22Z6kRZZXiPgs63Qd0SP9Fj5ZKvG1UFqRdTdKZPQsqvvS 5yJafoxy970FMUbV5ntEulCgzPb1gt9jIZmg2oe1Z+ma2MJjemSPpNDWItoM423Wv4A7 iNnLGM58Fiq1z3yuvXlzZyO5taeXS5sVL+xiVVCzX305bh8IYngGA6ElOcIXHjKLOJ/Z zKQ0ASUbRk2K8H2lVm3M2CmFSTkg3vRreath+zNXmScNTf2DrbEB6hek5/hfcT8/rBTw XHLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EDpEPkJ9; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a656446000000b0050bede17e7bsi4098195pgv.347.2023.04.21.08.57.07; Fri, 21 Apr 2023 08:57:21 -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=@kernel.org header.s=k20201202 header.b=EDpEPkJ9; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231808AbjDUP4L (ORCPT + 99 others); Fri, 21 Apr 2023 11:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbjDUP4K (ORCPT ); Fri, 21 Apr 2023 11:56:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87FA493F4; Fri, 21 Apr 2023 08:56:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 241CC617B5; Fri, 21 Apr 2023 15:56:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80B47C433D2; Fri, 21 Apr 2023 15:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682092568; bh=25t9JqK40yjvR8X6NIOYYvTj1/0mVvqPVROoptFqbdg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EDpEPkJ9GCSXa6Y/Ytr3oMPrEVMt19wNvSIMgSva04q0zqQUc4bI3lTIEEK4aCdoD sjrBjbQKOEkNQtcBh17ZWiw/YcpGYlZznRT21slAa6rKcP/O6SPXsMpFMyjtuSzS4p T3a5/kO4yVxVOamchKhzqq2pBdpi2vU8gNG0zxIPSNbsZV7Pt65SjU6YYb/kOqFKQ9 ymYeh+hAdnyejQBMA8+FWXMWUtMSYS/Q7qBNx6tUdQsx7L8eDttNZq5stU7nCk6Vpq Ez5D+IV6MUxTHgXKfa2Re7u9Awbq9CdbhHkqADRET0URfrkQrWYpi10yPRN5kBbZ6q tm49wKtN9zIqA== Date: Fri, 21 Apr 2023 08:56:07 -0700 From: "Darrick J. Wong" To: "Ritesh Harjani (IBM)" Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Jan Kara , Christoph Hellwig , Ojaswin Mujoo , Disha Goel , Christoph Hellwig Subject: Re: [PATCHv6 6/9] fs.h: Add TRACE_IOCB_STRINGS for use in trace points Message-ID: <20230421155607.GI360881@frogsfrogsfrogs> References: <12576fb7b6a9720cc1d5659e95beea948c27907b.1682069716.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12576fb7b6a9720cc1d5659e95beea948c27907b.1682069716.git.ritesh.list@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 On Fri, Apr 21, 2023 at 03:16:16PM +0530, Ritesh Harjani (IBM) wrote: > 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) Looks good, will fix the indentation problems on commit. Reviewed-by: Darrick J. Wong --D > --- > 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 >