Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp204817rdb; Thu, 25 Jan 2024 12:31:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/rDUoiBfYtps7wALTQatE1E7ZLEoepKLIyyrkkVKwNluYXfe3gDMxPSJ/mUeNKVA0xapy X-Received: by 2002:a05:6a20:1a83:b0:19c:6970:bd16 with SMTP id ci3-20020a056a201a8300b0019c6970bd16mr206209pzb.104.1706214703062; Thu, 25 Jan 2024 12:31:43 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c19-20020a056a000ad300b006dbafd2af90si13197600pfl.22.2024.01.25.12.31.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 12:31:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=XH6NmhkD; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=TOwon79K; arc=fail (signature failed); spf=pass (google.com: domain of linux-nfs+bounces-1430-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1430-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0531AB21427 for ; Thu, 25 Jan 2024 20:30:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B88D813541D; Thu, 25 Jan 2024 20:30:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="XH6NmhkD"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="TOwon79K" X-Original-To: linux-nfs@vger.kernel.org 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 B747E137C20 for ; Thu, 25 Jan 2024 20:29:55 +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=1706214600; cv=fail; b=GRlRg/xYmMRwVzaIG6E1FfrKwYdk0jn0Vv03yupn/MWXhutM/a5E1YaB6doOIthrNvkHajKy3noUlSCZHAmHVXEvOTHlLKwTbgXoCsQCnm/RfUyXGR9eZLdpxoV7cOR+dqF1X95osX0vAexJbNzusI+biMIsQjH1a6uqHlja6ws= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706214600; c=relaxed/simple; bh=2ID0U6xZDsMlT7TgGL/C+giyXokYFQj4iWsYlOijV0k=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=J8qP9zGopp7cYDUoMMoGktJFg/JpvlqHykAU0M+JG2+XWtE4QUV1P2Mxd6yq1OwM0gc2ffyYCnSaHa9ijRBFIHhwBeEgYVjKg81oBjFUdx+kYaRiIvP8artA3+YRKue0xtPcdBIv0SK/AilFvleHCXD4QYm9oiaIzDvFe5B9Wic= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none 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=XH6NmhkD; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=TOwon79K; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40PK43cf012784; Thu, 25 Jan 2024 20:29:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=corp-2023-11-20; bh=U9DbAPzmVDT5fA24dv6SleKbduXcNXf9X9loH+DCYJY=; b=XH6NmhkDgbeW+XtvSdOpXfLpYWwv2FE2klYMH+Z2m1e9uXR8Cy/W4i3aIa2OcJD6jCDb KBBwXah37QGiyJfslnGuFC5JexJ63imOAwIVZXIfUOJzqk2l9VtyDE6BXZLuHh/p1cRO BOpueI5hHFsvgdonChmflDe1MPxKqKmnYj8WbOILyIpMJizQpWdB0bjxhiVbP2o2Q83W becQWuGIzFRsMB7//ykHDI+D3JXO8QbxRz+eDZQBow2P5JCu8a/EdYvrbplEOFbZ5/3e 7ReaypnuXCucBLzBQYAiQ/dDLlYROzPMOSP9w4Uwrc1tQzIA0n3zAeqkq5EODhgSXvOB zQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vr7cv08yb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jan 2024 20:29:52 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 40PKSxfa030795; Thu, 25 Jan 2024 20:29:51 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3vs375e6rn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jan 2024 20:29:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDF39iMvCh/wsv1vvX1NvIzMTPozhHzrh3wY2+DfwypYUJcf6isdVjQ5Dp9mYjuBIIqNPCBbaUIalRCQi4/ARC5AE+ZXEHWhfD5B86zhpTFuavZeT5lgR9EdXC70oX+iPX+BnI6u4FphpzvcM+CKJTcEiutWUqKaOEBRls3IBGtnA+g0Ep3dygfWTreftC0koUJA1jEdXPIUeNxdBrn8e1la7hB6ycuC9RTarmm56dlM0GA+XPaFHwmR+I9RgjmD/k7wn5jbAjdDMreR9mLr+UPA97ZaCzboJXrdPIMWjDTcY5LDLYRYxo6hOdCI+Fru5WjCYKfAYlV2ttYTl69UVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=U9DbAPzmVDT5fA24dv6SleKbduXcNXf9X9loH+DCYJY=; b=Mt9M8Z7O408aYnj4hEjJf3y+Q0UxNzir9kE7icMZfrXwIL4B3m86SgBCqbIt3ScgUSbHOUyaUoJAl/y2nfdzEys1sxkymKWWgOUfD838BkPYEVIwvrFoGQziHZbVrwb6BLswBgHjrgwJ9nEtinJjKHXOvTdd0U0hHXeG3NWyeWnf5tuITnmPNeZpOEOe40yj+gSa9lb9vQbVV+keo1quT1SMda0F+grNibOooE2w2P3immo1AX/7ePT8B1F28cRFZK+m02S0Cq8eE25luOERg+7qvbiHwk1pWVG64v/lxYA0PbFL6JQOHDrUDFrZFjPACmNKWp7H15BDVhdW+HIG1g== 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=U9DbAPzmVDT5fA24dv6SleKbduXcNXf9X9loH+DCYJY=; b=TOwon79KtSglYxVbqjQiR8VHxOIp9bA+QYfF/vqJnSztxTqp4DMSMkrvRDRyjwg2dIrzkxzBBXyw0a48rFa0pJC9utAjAsWokyAky2RNXKHaOzI2A5O6Wp+1+tjG9LdISDBdYV22yWGExge2URUTV6dwGby7e0QJ8sS62bsh6sU= Received: from BN0PR10MB5128.namprd10.prod.outlook.com (2603:10b6:408:117::24) by DS0PR10MB6271.namprd10.prod.outlook.com (2603:10b6:8:d1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Thu, 25 Jan 2024 20:29:49 +0000 Received: from BN0PR10MB5128.namprd10.prod.outlook.com ([fe80::5475:bf96:8fdf:8ff9]) by BN0PR10MB5128.namprd10.prod.outlook.com ([fe80::5475:bf96:8fdf:8ff9%7]) with mapi id 15.20.7228.026; Thu, 25 Jan 2024 20:29:49 +0000 Date: Thu, 25 Jan 2024 15:29:46 -0500 From: Chuck Lever To: Jeff Layton Cc: Chuck Lever , linux-nfs@vger.kernel.org Subject: Re: [PATCH RFC 02/13] NFSD: Reschedule CB operations when backchannel rpc_clnt is shut down Message-ID: References: <170619984210.2833.7173004255003914651.stgit@manet.1015granger.net> <170620013252.2833.10156142379669175540.stgit@manet.1015granger.net> <736b0c878f228e28e0ae18974efbddca17c1919f.camel@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <736b0c878f228e28e0ae18974efbddca17c1919f.camel@kernel.org> X-ClientProxiedBy: CH0PR03CA0362.namprd03.prod.outlook.com (2603:10b6:610:119::9) To BN0PR10MB5128.namprd10.prod.outlook.com (2603:10b6:408:117::24) 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: BN0PR10MB5128:EE_|DS0PR10MB6271:EE_ X-MS-Office365-Filtering-Correlation-Id: ee6c00ad-e147-4e49-ca25-08dc1de460a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WxSWddfmoa4GraUQRqA8Hh9ZaFT8ncs52K0xP0tLnvVQNE3SQtaEnh1lZiEVKNekKVeGKnOt8Qo7GLBnc+kBno3/SxBusn7gKZ+sKnfD4NBNHI3TeBWm4JLmLDx3TxKxIWFNT5jgTNHGUmu9RTPfqFGBPE4dxtuj/pYYbr3TneseEv9oWtzut46czQUJsLsYSxSZUK4G1Q6C/bb6v/CMZOuhHQegLpJi9uavkZGqbSR88sR70/5d5yqSM/BBIJpAOsxav0InWdMh0c3y12RLrLypbGJzI8LXzfUONZxo79MRs069V19drQAeuk/ARdIlojd58EKFesKXXNJZ99et2YfYG6c0SUDqkoRIwzY5qvze4rY1BOVq/yxG/z8zVuaR3AaIv+TKqkuq6M8X+N3MC96No1m/LYaRXngnRbayvSps0ntDWFiGTDOg+M8nHpACZE57xV1EwhnBa687TjMsYPUbbOtxZQxCcAA2BdJ0mo3iJBVyi2VmbVGBGHZHDB3K6qX/57mOih3Si+IF7V9zQIrD8WWr0TCxvT2k0WtcGTMZXVoZ4RNSIWdrkZoOLdfm+3go1hUxfhMzBTq1wlWRUKKIGV4fnt5lWmilrn810bM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR10MB5128.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(366004)(39860400002)(376002)(136003)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(38100700002)(6666004)(6486002)(41300700001)(478600001)(26005)(83380400001)(6512007)(66899024)(9686003)(6506007)(66476007)(316002)(44832011)(5660300002)(2906002)(4326008)(6916009)(8676002)(8936002)(66946007)(86362001)(66556008)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PND55GiCTCtDw+8FJ10vaNhudw8NTXP/xwMtJzAAmL8i06V2o4JYMP13dl5Y?= =?us-ascii?Q?pFca071mJtC3mw4z9IqtvO1DKnJKdN3jcYSRxYDkbe2woa2KW1x0eZnwlh08?= =?us-ascii?Q?W085f8lmo/PWAD6rhG3vZFMO3Kg3Eg8Zk8xfyU2rh1z0RDM9Jmj06iZM9w6K?= =?us-ascii?Q?nYzjDHF9G0CzNdsSLS64UC1Txw1w16feo9nw7f2IAAo8EsbYRLY9F7dYx+ga?= =?us-ascii?Q?T5NjHzbE0QHkNKrCDCvAJSIxaNl7QspUQyBBakqBXnPmJ5IE5ZLtPjSqlB2w?= =?us-ascii?Q?JGOXJ+/uLgdPRqi4qyUQvtOG70xGpcMTWkiu6oSWcFMVG5lzriCTXBWEh0yP?= =?us-ascii?Q?6QDnJVgHjWXLqoEnV97xxOp+8UaOMC/Z/Wi62cDXgw+JVLYeVtIs2eEseYUQ?= =?us-ascii?Q?FRaZvBJryeWzuE94bImKYCPvNU6xdTbi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sTI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee6c00ad-e147-4e49-ca25-08dc1de460a9 X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB5128.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 20:29:49.2761 (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: SdN/wLM2NrMtWwHk/odejyIQWVR5aCkeOiCa8Upzxs4eAaXWsEcfYel60aaDcbgVPA4XygtXHewVjGw89fWviA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6271 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_12,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401250147 X-Proofpoint-ORIG-GUID: WCWvIZU1-fDaKFs-Q0I_I8xajBKX1U9s X-Proofpoint-GUID: WCWvIZU1-fDaKFs-Q0I_I8xajBKX1U9s On Thu, Jan 25, 2024 at 03:19:41PM -0500, Jeff Layton wrote: > On Thu, 2024-01-25 at 11:28 -0500, Chuck Lever wrote: > > From: Chuck Lever > > > > As part of managing a client disconnect, NFSD closes down and > > replaces the backchannel rpc_clnt. > > > > If a callback operation is pending when the backchannel rpc_clnt is > > shut down, currently nfsd4_run_cb_work() just discards that > > callback. But there are multiple cases to deal with here: > > > > o The client's lease is getting destroyed. Throw the CB away. > > > > o The client disconnected. It might be forcing a retransmit of > > CB operations, or it could have disconnected for other reasons. > > Reschedule the CB so it is retransmitted when the client > > reconnects. > > > > Since callback operations can now be rescheduled, ensure that > > cb_ops->prepare can be called only once by moving the > > cb_ops->prepare paragraph down to just before the rpc_call_async() > > call. > > > > Fixes: 2bbfed98a4d8 ("nfsd: Fix races between nfsd4_cb_release() and nfsd4_shutdown_callback()") > > Signed-off-by: Chuck Lever > > --- > > fs/nfsd/nfs4callback.c | 26 +++++++++++++++++--------- > > 1 file changed, 17 insertions(+), 9 deletions(-) > > > > diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c > > index 43b0a34a5d5b..b2844abcb51f 100644 > > --- a/fs/nfsd/nfs4callback.c > > +++ b/fs/nfsd/nfs4callback.c > > @@ -1375,20 +1375,22 @@ nfsd4_run_cb_work(struct work_struct *work) > > struct rpc_clnt *clnt; > > int flags; > > > > - if (cb->cb_need_restart) { > > - cb->cb_need_restart = false; > > - } else { > > - if (cb->cb_ops && cb->cb_ops->prepare) > > - cb->cb_ops->prepare(cb); > > - } > > - > > if (clp->cl_flags & NFSD4_CLIENT_CB_FLAG_MASK) > > nfsd4_process_cb_update(cb); > > > > clnt = clp->cl_cb_client; > > if (!clnt) { > > - /* Callback channel broken, or client killed; give up: */ > > - nfsd41_destroy_cb(cb); > > + if (test_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags)) > > + nfsd41_destroy_cb(cb); > > + else { > > + /* > > + * XXX: Ideally, we would wait for the client to > > + * reconnect, but I haven't figured out how > > + * to do that yet. > > + */ > > + msleep(30); > > + nfsd4_queue_cb(cb); > > It would probably be better to just queue the cb as delayed_work here, > so you don't squat on the workqueue thread. You found my placeholder :-) > That'll mean changing > cb_work to struct delayed_work, but that should be NBD. I've looked at that. I wanted to be sure, before going that route, that there is no obvious way to implement a "wait for client to reconnect". msleep (or delayed_work) is basically a slow busy wait. > > + } > > return; > > } > > > > @@ -1401,6 +1403,12 @@ nfsd4_run_cb_work(struct work_struct *work) > > return; > > } > > > > + if (cb->cb_need_restart) { > > + cb->cb_need_restart = false; > > + } else { > > + if (cb->cb_ops && cb->cb_ops->prepare) > > + cb->cb_ops->prepare(cb); > > + } > > cb->cb_msg.rpc_cred = clp->cl_cb_cred; > > flags = clp->cl_minorversion ? RPC_TASK_NOCONNECT : RPC_TASK_SOFTCONN; > > rpc_call_async(clnt, &cb->cb_msg, RPC_TASK_SOFT | flags, > > > > > > > > -- > Jeff Layton -- Chuck Lever