Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5029120rwl; Mon, 10 Apr 2023 22:32:37 -0700 (PDT) X-Google-Smtp-Source: AKy350abDm8WJ4rXvAtQ2XZoW/VBmhAk6qnzmyn0zRVjo+r1cOyxeeBf1XwtAcmDfkT3r0FAqtZO X-Received: by 2002:a62:5256:0:b0:638:7e00:48c4 with SMTP id g83-20020a625256000000b006387e0048c4mr1694862pfb.21.1681191157349; Mon, 10 Apr 2023 22:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681191157; cv=none; d=google.com; s=arc-20160816; b=oWdoebINOKdpkPj95seHcmXKr+ecjfTycXzhfDldc45xpvGQXFpm1nBNLZ5wWeomYT Cepw04k/D/sFaN9Zj3qQReleFXUDwwRhVjZyzV0XyoEa/U4RSHvRyc5GMAUL4RGDkJjz vkmVtLOYX5mnopEd+zmGkqIHTM5Ldrl9YXWOD9c7rfjatE0/UMON/n+xzv1P8DIMTF23 WCeGPttnY+WAZUoQpouO4c8g8ouu3zsAL6Ue8vpTx1jKeOZDRZlkTdYQfjyorWahMjfl YbO+h+UqhQbSKf3XR+pjvuR31JBMssRY2NAyOC9O+L2MROTciarsXRL/9tGm2NQkYA4s f92A== 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=j4dSPNE3Doov2vjKV7WUgwllOPrKHYZmVcXEsUSEDqE=; b=qlki7g94Q1arNORpKKiAtqRLZvJBSAxqKMin1x4HQwN/a4OGvi1tBH9TZ9egk4ABqB BxFvNv1+a+csP6E0rpcDgPSQn9i31S5HISZdOjkprSxKVrfBrWmvbkoNS64KIkDlFj7y 7ZBbI12b7dM5nZqM5AV4yGqwKdLtgZB9YqLx5tSUrs3++SLfmMJHsweAZOGfK4cWBsW3 yk288uLNxMKwTG/tlGo7I8edmqqYc7mklnF7AFboYOGhcmHs764ynfo+1wqc+WRHU7cK JgH5AnwVFAWL8Hmk+zx+8NBoXQdm1O7W3poxfmPHqXZLHA44UIlslobdMGI08RRdDIH0 3PkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZBwRputx; 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 b26-20020aa7951a000000b00625e575183esi12740623pfp.134.2023.04.10.22.32.24; Mon, 10 Apr 2023 22:32:37 -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=20210112 header.b=ZBwRputx; 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 S229998AbjDKFWp (ORCPT + 99 others); Tue, 11 Apr 2023 01:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbjDKFWk (ORCPT ); Tue, 11 Apr 2023 01:22:40 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34CDD272A; Mon, 10 Apr 2023 22:22:30 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id h24so6923512plr.1; Mon, 10 Apr 2023 22:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681190549; x=1683782549; 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=j4dSPNE3Doov2vjKV7WUgwllOPrKHYZmVcXEsUSEDqE=; b=ZBwRputxVnrrh9nkhVvx622zvApJ3pZF6BIPu8U/Ti/I+ODOA8YauWahUPQ5eRlaZV wLUhIa8V7lXhnH7aR/cUKq6hmbG7fwzV1I57L89r7HkmlaVIdgA02eBxxLg4xa2pPZzB zXJ4U5pFhjIb2xMzzYOV6olqJtbf2UD4DjDzrCuHbxpDdWx8x01dLL6L8IshV8y6bZX6 iH2RWA8WZLWg+K8lWhyFlJx48voO21OaeIeQTpnMAKZmr0DDbohPuibhfOSDHLC6fqYr lLtPZqw5Lz9czGSqEJvvjkS6ZOBtPFtiEE6A2cdamdCJP38zrM0+YfDBR9LJJf0PD0zg j2tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681190549; x=1683782549; 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=j4dSPNE3Doov2vjKV7WUgwllOPrKHYZmVcXEsUSEDqE=; b=nye6AH515EVAm8szsJWPF7iQ2I3Ixyi4U4TwscMyG0S0xDuSoS4WTHvwgaswCQrueN u+Vtg5jBGHt/excq2BwVXPRFvdn6pwyzpNpNhlCTNsZFbbw82BNE5QmATU0EziW8zLEs +/qLE+k1hDpu91OqJjGdPuap7BrygW1VacpF+ZHzoVlSdM0ZtSQgTgeQCcvO5ChnxgH+ LvVX7/ysJQZwNMjrix1W16taXhDcl7I99Cj99D3W21wUvHLACII4xyV3TAQ9fRue/BO0 6oSsvSrhra6Qd31eNUp+RuJC75Ypg7K36Hdhh1lo58SNOf/vYy43foSU4MsZrnb5b1+Y 7Alw== X-Gm-Message-State: AAQBX9d5RW0fMNrfuSnhYi04Qz2wkUkb4V3BeChvyytt5VMCUhY7KWlX /d2pxEs6bZq4fQyBaRN+1fkTNNYkV98= X-Received: by 2002:a17:90a:1953:b0:23f:7666:c8a1 with SMTP id 19-20020a17090a195300b0023f7666c8a1mr2177550pjh.18.1681190549237; Mon, 10 Apr 2023 22:22:29 -0700 (PDT) Received: from rh-tp.ibmuc.com ([2406:7400:63:7035:9095:349e:5f0b:ded0]) by smtp.gmail.com with ESMTPSA id v19-20020a17090abb9300b00246d7cd7327sm646154pjr.51.2023.04.10.22.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 22:22:28 -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 , "Ritesh Harjani (IBM)" Subject: [RFCv2 7/8] fs.h: Add IOCB_STRINGS for use in trace points Date: Tue, 11 Apr 2023 10:51:55 +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=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 IOCB_STRINGS macro which can be used in the trace point patch to print different flag values with meaningful string output. 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 21d2b5670308..496159869af1 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 IOCB_STRINGS \ + { IOCB_HIPRI, "HIPRI" }, \ + { IOCB_DSYNC, "DSYNC" }, \ + { IOCB_SYNC, "SYNC" }, \ + { IOCB_NOWAIT, "NOWAIT" }, \ + { IOCB_APPEND, "APPEND" }, \ + { IOCB_EVENTFD, "EVENTD"}, \ + { 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