From patchwork Fri Aug 16 22:06:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Brennan X-Patchwork-Id: 13766851 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A88CD127E37; Fri, 16 Aug 2024 22:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723845982; cv=fail; b=cjnpoIBEBBkhS1Ebx3l4RrRqEL8Vfjfd617huUxcNx0hFAbMZDDqfw/mD7qVGS+LMAvVEh1oS1+Z8pdpkQXccf3T2CSktdNN/WHeu3scPaohgSdG2UPoOFTLEgLxVoUJIR/JvNFJ/LAf0YTjPHrKoJJM3MX4U+1TaLJxexG+42E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723845982; c=relaxed/simple; bh=CZZKjJjJuiiylvAGQTbHHcne2q+Gmr8EacD5wAqGeeM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=KmcRSjz8+w+UMmLVQvGNU8oE8Cj8wp1hWDH70fHPyWVm98ye+NWI/ie97bqtGXg2SGQg9E3U/+pBEOU1+Ix60Ysr9nnNryOzajbXszM74CmdbURMyT+cEg5GXEuTrqRyCNX8CHd6WtTmjOpveaKbwBuRr7Fk14OPJMmxCVEC3OM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=NV/HAfmw; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=HzK5nUUm; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="NV/HAfmw"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="HzK5nUUm" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47GLBti8027085; Fri, 16 Aug 2024 22:06:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=+l3ZoOESN4UNARCV+Z5YeM3dQbEI+2heGLvI7UW/hwU=; b= NV/HAfmwk03alosD3tVD3D9UQKFx3pO586J182cxd77BF5tD4274xwC6cN6ixGOb 50WZcRe+vRNM7uBNAmULMw1QEoDZiBOuyr5yxLHkMNpUFEMXWBUCiGeeeQ88mRbU VxdDX1EOQm+LjN8Hbk+UxqFVaCnOjeZo+bLK3FvOLjHxnArnaJwXe2cAxp8PUDTk 9RFvEArjO7zxETUr6yOOnpovpDe/OOMklwxF0RNrc7QJ+eIe0nlj/LNTmj5iDf/o 5/oyrTMFhesPIHke1zMdnVu3qcJNMyF1bRHBiqIYXyA4JyVsvz9PYTk48Hiw0hs7 VEOGBvzkwPSpbBJh/ij5UA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40wyttngvd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Aug 2024 22:06:10 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 47GKKSmd021228; Fri, 16 Aug 2024 22:06:10 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40wxnkdage-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Aug 2024 22:06:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=P/1e6yA4cfpnF+sZkC/V7tXag5liRJOeLWu1Fu0nh8gAzbVy21wUleC6nBCwHP0v2GNiuSIgSanIXYTMyDgCRvgVHcW0/3P4Mhw+hPZiWUJbOBAW71wCkD0Q+WB3kHDjUx42jFKS5KNGRbRwLJ6/zC2WT23H3gR+3upapEUq91toxLL24HLiGvkP++CjGZ3f1bJ7VYOgr7CYRmP8FJLMPtVjwPUoXKZaAWbRjF4+l4F0xJDvpCF1ng1cVLaWLld1OoTZ+pQ/5qdkaim07pesvz6AqfHRSLuaxzqVgiPo6Q0j8Cqj/jYzaWp+VH0igMVDNWieDbu/OwzT2AeJcMVnkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+l3ZoOESN4UNARCV+Z5YeM3dQbEI+2heGLvI7UW/hwU=; b=egaNWPxyl2gn02BnHa3FahT2rV2KFP4eVbt3U9UlMtLoPa4oPW4278VKdWA1TtBMO/bpiHYjIF6MGJ/mJEMHJAzhYNyt9UUpmyUIemDPOnCJEgEHwU5YoSVRoyi2S5fV+JocP6DFzI+WF2L5nl0znhq3Vpimt7eYbq8zE5sY1INTyhJNx/wzg2BNROyy6wNwRzBrrPtwmQiK5QYd3OAoHN6vIlUey73WMJSi5MkY86s6JASRtrW4KPwat6oRaS3OlJiR1rBh+B2D6yns18+yvZZpmu9h0srMfHQaogXJI0WSA7qS4Qqc9RdH1K64zAD4VEUpiTaJkuC8H7k5bIX8ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+l3ZoOESN4UNARCV+Z5YeM3dQbEI+2heGLvI7UW/hwU=; b=HzK5nUUm9fAU6YlyRRR6+EoYjGwLPSehQuScw1F4bQddz2titQolJBZ6gBbtifmt9DW43XpKic5a+UBDUw4esaVl9m2hLdUGPDUQOanLtS1vuD5mCEyN0xYB6tXY9WBJfVwKoTP6R636dw2IwLBo/OGDmsP4XNUEk8yx1z7Xpus= Received: from PH8PR10MB6597.namprd10.prod.outlook.com (2603:10b6:510:226::20) by SA1PR10MB7683.namprd10.prod.outlook.com (2603:10b6:806:386::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.10; Fri, 16 Aug 2024 22:06:08 +0000 Received: from PH8PR10MB6597.namprd10.prod.outlook.com ([fe80::6874:4af6:bf0a:6ca]) by PH8PR10MB6597.namprd10.prod.outlook.com ([fe80::6874:4af6:bf0a:6ca%4]) with mapi id 15.20.7897.009; Fri, 16 Aug 2024 22:06:08 +0000 From: Stephen Brennan To: Trond Myklebust , Anna Schumaker Cc: Tom Talpey , linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-debuggers@vger.kernel.org, Dai Ngo , Jeff Layton , Olga Kornievskaia , Chuck Lever , Neil Brown , Stephen Brennan Subject: [PATCH 1/1] SUNRPC: convert RPC_TASK_* constants to enum Date: Fri, 16 Aug 2024 15:06:00 -0700 Message-ID: <20240816220604.2688389-2-stephen.s.brennan@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20240816220604.2688389-1-stephen.s.brennan@oracle.com> References: <20240816220604.2688389-1-stephen.s.brennan@oracle.com> X-ClientProxiedBy: BN0PR04CA0028.namprd04.prod.outlook.com (2603:10b6:408:ee::33) To PH8PR10MB6597.namprd10.prod.outlook.com (2603:10b6:510:226::20) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR10MB6597:EE_|SA1PR10MB7683:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ab0fa6b-7540-4064-80d5-08dcbe3fa17b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: aXEdwxcQGDiE763aODYBmHgVP2vgtSSe/f350FaaHYc0zIVmTHTf5UhC4jEoy5RrJI6rUuS3sOaM/lpmQX5cM3k0JrP2/KkTN2Ow1flnROF30VsS8NBk5oJLLx+8eRMhKCL7x/w7BJhIbe5oDya2LPeam5CS6EttEh9jCvwEUcIIX0khXK7uA3pKCeDQJE/RoJhASOW5XmeadDOTTgWUJAH3AO7xGXzm7ZqC+XuSuBVxE90ZAtTFJoACZfR3Ute27a3mDpT4FxuS3Pvcb25PpRy0GazztnDQGI0B2R5F7tUIzg2xaoAzZiicmTDvDBHt3/Sn3gZfqFiQFaYiLev2JRZSsj1MQ9DwWuLhjntSn5+0Ghe82zhwL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597.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t2P7mZjwhzFr/CpkPt82NwcOVGXDGtjxAufzRQT3FP8GLuaRlrl+u/ztoKmmnh9WDjgzIJr1bYAYN+ucuHNctBFAKrD9ExyIYs38Z3FlXx9ZgapLgYWQG6UMR0690rNZH8yzgZ2fun8tlfakl8cDBvK6DrIifjQRiH6q6ZLOSwvKbHOk+BsPfVkyXQYjE/KfwB4B4t4j4yvtnSGk77IJ99BZGx7CWXDxX5Lw1+Lfs1KoZYLNM43djN2FC0OP9CwXxuEekK5t1dDPm6v+/465FLHlYyPmqOLL4jB80I59wP3oC74OBHoaq8TuYvf3BWc/hcN/RVPAobMHxAN8Dt6yjerx5b5Yy0rn0KPlKqV2cyJ/bgVEdAauYrIj9s/GDzLitPR6Pa2w91a1pwFH7iIszyEVZfEyu03zTmwiISIrPfiuGp25oHkXTY4wJoTtWu9Tl7nn/maziuRL0YEofFs4btZRQkSsvDeR0bfhH8wufCmDD4nr/CQYR3gu8peAYvtHWh2eywJ2w60v3pFsYO+bVf54fiY4y7BWNZOk9wQdzB3WfjeSUVVfoHF7JHS0AT8tQIMImIHm/ob7v200gYtMxpmr+Crsk4Lh//FlDMQnwShEqi+hGTajVgv1g6xu2AkZsO9jjk7sn+ud0JN2dtqC7p0SE83epjqYai6An5J8+UGb/luQjNhGQg1U+UnxTWWzzmNR1UYWBU0+zvkbIlHAujzvZEmv7YM2KyndFIe1i+rJ+5wSW+ChrgnxOeYxRaOxRp5kC1bb7c4ettCxNey8ZxbwE2R1y44EIqUA3N05YUxNvRpPgGA5t3ujCP6RFwrk8ss4o8euhD6VTUu4j9kkaayVMC3rfmpUO6mK7F9K4IjhX4VQWXDR+wowi+/gHqJ2gFk/By3qzRvKx/vGZl1m1oIcfM3PS3uh4wXozRDh0u0cilvK8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A1TGSAd8L+YXDSmZq9oUEoSEB9eGVSTXIciTgp2FOlLulJap1chYmT6xtkAE96EMiG+J8OMCEWqBoCHopx6KdHX+D4k4a0bBzCxpo4n0tjZE9YokiHQtxNyXEU5yTSbK+Eovu3oWFVoSJ9bm+RThb9NC7ye3BGMrxvCH5gFnOqGD9YaFNa/Dvt4zfvJ4CO8N2Szx2V40IsX1P4dK40xxkFzdLMzXymzgfaUXmQEaJ5NKhdrjYpTuBxBiM9QJv/71G1jyDvnDNYZLsTVArj+5L/b3zj9Fta2k6JauRwCqzECttg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ab0fa6b-7540-4064-80d5-08dcbe3fa17b X-MS-Exchange-CrossTenant-AuthSource: PH8PR10MB6597.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2024 22:06:08.2338 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1POfpwRlTZ/3ViaxVqOoazsWdN3c/aPP0Gx7z1tyrwcNkvwZM/+FoR59yTpR57nAQvOdFVMq+7gdbRpzbLR/8/d43L+j3mbSmwpGzULLbCk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB7683 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-16_16,2024-08-16_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 bulkscore=0 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408160157 X-Proofpoint-ORIG-GUID: gVj9vEUgL3sQam5VG0WOUSer5-ns4znQ X-Proofpoint-GUID: gVj9vEUgL3sQam5VG0WOUSer5-ns4znQ The RPC_TASK_* constants are defined as macros, which means that most kernel builds will not contain their definitions in the debuginfo. However, it's quite useful for debuggers to be able to view the task state constant and interpret it correctly. Conversion to an enum will ensure the constants are present in debuginfo and can be interpreted by debuggers without needing to hard-code them and track their changes. Signed-off-by: Stephen Brennan --- include/linux/sunrpc/sched.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 0c77ba488bbae..177220524eb5d 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -151,13 +151,15 @@ struct rpc_task_setup { #define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT) #define RPC_IS_MOVEABLE(t) ((t)->tk_flags & RPC_TASK_MOVEABLE) -#define RPC_TASK_RUNNING 0 -#define RPC_TASK_QUEUED 1 -#define RPC_TASK_ACTIVE 2 -#define RPC_TASK_NEED_XMIT 3 -#define RPC_TASK_NEED_RECV 4 -#define RPC_TASK_MSG_PIN_WAIT 5 -#define RPC_TASK_SIGNALLED 6 +enum { + RPC_TASK_RUNNING = 0, + RPC_TASK_QUEUED = 1, + RPC_TASK_ACTIVE = 2, + RPC_TASK_NEED_XMIT = 3, + RPC_TASK_NEED_RECV = 4, + RPC_TASK_MSG_PIN_WAIT = 5, + RPC_TASK_SIGNALLED = 6, +}; #define rpc_test_and_set_running(t) \ test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)