From patchwork Mon Aug 19 15:58:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Brennan X-Patchwork-Id: 13768526 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.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 3F6D92D045; Mon, 19 Aug 2024 15:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724083160; cv=fail; b=jpoJ0b1DV9+sTJqBuH6fFi3Z8cLDFJgIIsXEmbikxaz1wO7aGcxLlrzkaDeougrrNU59AdxR4QEZLrIlE/VVjket0f5Z2YdAIVUGwc7BjiNVtmjmVbJjfXCepulah7FCMpbXQ5uoeCNARX9vm7BU3QJUGNbcG96iamy295A9gC4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724083160; c=relaxed/simple; bh=rFB1ujjvXQd2mqo2FUgWRcXz4P/O9OAJYMkR/AZ+1yo=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=dw2br49xVKcDyzBDVEqg8+w/9j1dCS9Yz8qn+kUXGj6Cs8N3WvDO0djmatBAff2EJt+5YYSJNTF9sjQ9ByTrrIYv9A1J7Hp2c0UzVSnmCdZvd2g/+eBKHFQ6s/VPYETZp3yg5w/qFSGqqooavdml/8DcY9z6Oqxha70ygp08mGM= 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=hWdFhSAK; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=pGVjMseb; arc=fail smtp.client-ip=205.220.165.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="hWdFhSAK"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="pGVjMseb" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6so0013190; Mon, 19 Aug 2024 15:59:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=corp-2023-11-20; bh=QqAIR2V86dsPL/ 5hjufp6H4anoJk1+69Uu+D7oyYFJ4=; b=hWdFhSAKV3fls0e3k5SeV4hp2JE0D7 1I0L6xqpO6RsS2KF1UWnDjpuukLbjvS/Ilvq/mgrX2tqb0dQHdwCi6btTnntIM4I d0Bd+Tm6JBA8zUXg9E6G9GoeMFqLnb3WJwshsdD4uliH9qDfFr6BXGSQhId2P6T3 ngKyNNaN+GlDXNALLh92GrRbd4e/AkjqoA/6l8sWJIoA9SnLWUFrydXAqzXoP8PF akrdMtXs5klJia/oiTZ/GLFhbo7V8hHWhB+JLba4qj60L30Mg69pbaqMAVinpmsK NQz9hNmj4mlMfiOvvC0eUZz3FbesZSEUJY1EGeUwLHxxgipiGz+BjoxA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m67axp4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:59:08 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbHjD018969; Mon, 19 Aug 2024 15:59:08 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2049.outbound.protection.outlook.com [104.47.55.49]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 413h428msb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:59:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Gwd9GARb+2dAlYAa+PGs0GtDHhWpxpD1P0we2LrShEtlP5wQ3mniFHlkhU3vRMaZgJ2nEz6cYfaoIcTaTOfqdi+HUS5pkZzm1GAMlRxi0TEyfKBcDZcWJrQBr2U6QmP66QU1coCuXuxeB6tswvWGQnow/fkUQ2kQ9njTuKGJa5Dwh4kw1d4e6iwVJ8PPgfGiaKrbQPOLaUjSkBaPlXgXHHx15TxFPAdJj/7l3gb8p3e8AABPa5t2GYe5QlPgL6uiuGXCvVAc0cpmGcmR7kuIwcU6M5fVOtMgZ/OpgChdglZRvTINIy0ne1VoF7H9+30z3zoesZQ3bOavhTI7kwcEFg== 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=QqAIR2V86dsPL/5hjufp6H4anoJk1+69Uu+D7oyYFJ4=; b=a3aFMXXHJNnSlH1KzuMLuOZSFdFffCaLxbnGk1PGgLRVBUoqKMgQo2AxN9s6IXTl9ZMpt6RTt7lPGXknnicLqe5wxaTBnbrwkcdWcknd32uiA+8kkJ/GPdoAg7Dx4u3vzpB/GXRZbqGlHqnNx7UPwIRUM4oHbSO/pSKcog9xYpzE7kTAdNDT2KNSo6pxffbHdXQRfS34uXOT7crZAYgYHz6pbMadcUmz674fBcNtMdbRjTiJLywWL2flTptnHFVj8hb8M4c9dR6GhWpwinae6GgnS7aIQohAaT2QVMptjPn5jDGvX7ZcS3m+3giRfsrEsM2mvG4NZElLbQjQv/pqig== 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=QqAIR2V86dsPL/5hjufp6H4anoJk1+69Uu+D7oyYFJ4=; b=pGVjMsebK+9TCepmOEXxbtp8YIL94XwBycjHpptp1smhW8RpPH2QNjdzin2XKWMgwDDi87Lq22gjX62FoQNuYwJ270DTsMDvZLAQqjMVRfSvS4UyI6QkDXuLO4pIasjH75icFLhDVZb/6WoTHiGlIB9s5At2ih/avdAlMbzzVxU= Received: from PH8PR10MB6597.namprd10.prod.outlook.com (2603:10b6:510:226::20) by CO6PR10MB5635.namprd10.prod.outlook.com (2603:10b6:303:14a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Mon, 19 Aug 2024 15:59:05 +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.010; Mon, 19 Aug 2024 15:59:05 +0000 From: Stephen Brennan To: Anna Schumaker , Trond Myklebust Cc: linux-nfs@vger.kernel.org, Tom Talpey , linux-kernel@vger.kernel.org, Chuck Lever , Dai Ngo , Olga Kornievskaia , Stephen Brennan , Neil Brown , Jeff Layton Subject: [PATCH v2] SUNRPC: convert RPC_TASK_* constants to enum Date: Mon, 19 Aug 2024 08:58:59 -0700 Message-ID: <20240819155901.416560-1-stephen.s.brennan@oracle.com> X-Mailer: git-send-email 2.43.5 X-ClientProxiedBy: LO2P265CA0447.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::27) 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_|CO6PR10MB5635:EE_ X-MS-Office365-Filtering-Correlation-Id: 683fb584-b44d-4c47-df92-08dcc067da39 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: fy1xlJGe+VjMTa7HoVa9Vds2x9JhBQMeW7WRqBFPEf1/BThvdgyeZT/KbyAIJg4bXpGkIAaVXrG/PClWs4QngXtKaHDZgfV52KmWoK0OLsV/Bb+McUnWITRTE5sPfW2spzA4AuSKaCUwGUJ+nodakVdftrl+7HZPhsVCmSOJ6A2617bdz1q0VbO+q+hJcyvOBp6/ZqAPyoeHIOF7z9Uy8JOPHhvmqpk3AfsYMfVx2pF1iJrQNVUjfwTfx/qb428N4wpq6/3RJMwPiUnJkws/wN3PebYfMdUyj7f1XF2ICKiK0/yFSb8v9qSFJFPqGc7n7Bl/LN5Wc5bLa9tI3P/hPbMEii3OXTiA1z/llUp+16hlnCmNqyJrkZofObAWiitv72OljcDh6dreCM/68VaGXqJhnudV0Jh/Ag0xpANbDUJXwPm6ytE3QPHuzXTUJEhS2eb4hVGK1EqluZe1hoh4KwFSG/TfCJ1Awt5d1l+ZbSCHCmAKr5prlCWKZQXMil13QCkBKGgF7ozz3Yt0YL6VThMUU4osEXbQMKHXB5cB5UMjDPiECF+2vwBO4QBlWGdfJ0JFyh7Uy7JjT+pOGZdn7saFPWJThWUYB2Zfj99uCaKMnNYUDfD6S2FvppC991xfoVi5PmbbFg9zU9Yfxj8iboRKvwbYRCBlE0gOUy35tP8Dm6hjRGl8F8GXFfDRRY1XqPdNk51g/AgnodHsVREYpIvnmncYVwPtsz0w44TXUutQY877d23BL77YSf5LYxefEXcPVBlWWwSIuxntp+bFD/2TsUcpce+TMP3YaTJ9iToIIYvOUnE8u1YprznmrVCOS0m7vkYbSBP+HLovLA8RmxZjE++if0erTSsXAylMujdO4+wjrLHRAVCjpOVRCZ8hoG89mzrj1H84BLCoF88wsvFuuVSHmWmG5CiMzlImFM291bbR1Bgw8RlJw33MAK5f6bK+qjVQDHboV1dDJXFBLA3Pk1NfqzYR8ng+I4CjcD3ZnWKSA9GO8pKseIb+3Vi2pHwu346J2D7ZrSHcOxfxoeVQ028x0aS11yaCGDrOf8eXPcxvxa/F77TH9CUPvoyFf5Wutz4rlQcn1wk3lVYACG0DkP7OQBNhpRJ9JRmM09rjnM58PlSCJ7FyyqSQjDVtNQxalvD8eoJDzkbFAzEmSm7s2Ra4s1EupD8i+xJCWaaAUPkEP0SE1uZaJaBGumCiQJX0MngSvLi8KSDhE5EzPWV5DfsXQ7ilzjakmjASd7DdYADdFfGpdRAOmXQvmfQdx6RlQKByAvd4EYW0AIKiH1vgQNQ3rTzsel9T/MVvkCs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR10MB6597.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: O8P9fOUabWfBXlJoxNo5/rEg2mc+rKZ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wU5goGBXeZnmGHqSrWZry+7FOwDGOAlxma3a0avpHHEi7OgoYEHTpnMCVEtQoxfGRFDIELq74X1oxv6NV9rdL8AiHPxQFjLWzlIhQczAU/NrRrVaSQK5Ux5W1RQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 683fb584-b44d-4c47-df92-08dcc067da39 X-MS-Exchange-CrossTenant-AuthSource: PH8PR10MB6597.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 15:59:05.7988 (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: f8wG2Q4urqechZgmFsbniWdn71vSXoLbH+fQ900aL2v+fQoB2WvozxNRAUYC8+aLe7JxxrtZhOLNzOkUhgNWg/vQviS+zAA0h2k/1ZJ200Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5635 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-19_13,2024-08-19_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190107 X-Proofpoint-ORIG-GUID: hfHFqGLb0AM9xBBV0FfsjE-CJsdDM9HD X-Proofpoint-GUID: hfHFqGLb0AM9xBBV0FfsjE-CJsdDM9HD 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 --- Hi all, For context, please see v1: https://lore.kernel.org/linux-nfs/20240816220604.2688389-1-stephen.s.brennan@oracle.com/ 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..fec1e8a1570c3 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, + RPC_TASK_QUEUED, + RPC_TASK_ACTIVE, + RPC_TASK_NEED_XMIT, + RPC_TASK_NEED_RECV, + RPC_TASK_MSG_PIN_WAIT, + RPC_TASK_SIGNALLED, +}; #define rpc_test_and_set_running(t) \ test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)