Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp74517lqm; Tue, 30 Apr 2024 13:14:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJ0D0UFB0PqK2Qmdqm5dJ0XWH68l1x59ud9EyMuD5Bvv1m3A/leJSzycvBEguXGYEjMLryBqzDiQJHD/bCxZdmcUdult3mNFoJ6hAhlw== X-Google-Smtp-Source: AGHT+IF2OhNou2CPgFCHdGGqqc4qtd7iuTAiITW7xgOPu34Bk9jxVD+C34VQukzKEKEHnQfGR1q0 X-Received: by 2002:a17:902:d2c2:b0:1e4:7bf1:521 with SMTP id n2-20020a170902d2c200b001e47bf10521mr6224402plc.19.1714508041838; Tue, 30 Apr 2024 13:14:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714508041; cv=pass; d=google.com; s=arc-20160816; b=JNzENPhOSBXD3rxvaoNF5kRDmmVu9rFLHO2+pd5TQGnBvcsV20s1DxHcVbxgwXwEd/ P5mfqzWD2etMKOhFHDLQC+SOHOk6FyQyHcBkrhtc+X9RIAePvVzr1pk+jSdlM3LoSfxN s8SUcG7Ox/p4QvKKBT6zt6n5tOSTvU+J3+fhZvl8Zr5guLO0ww/4pnLhi7FSkLcWWGEc Ugr3e7wqo+/8pCMHwCxdK2Lhe0904l3CqeDgh5xhGRVPPLkNdvmF2mcwTQ8qlAHNon+C mTqV9gxMXUE0cvKZxEKZyS6S+seWR4pB3uo4dF7Xrt68D32vLMNIApjqc0gHi+fIQntm oy3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=IGEISvYUDsLCZAS7II84IFCz5s4WmgbaxQR0IEOl24E=; fh=PtHAaexXubJMN0SUXNM6xFPH8yz+/kYpWu1buuWcQuc=; b=baH3yzFcwlixLFa2YVu2pJRPWrs2ArrYv9IAP4cfaPsjL60gDMOnkjYDX9EDxnrqhk yno05BTt8rVfFZmf9rM+7wK77gaW2kINpUUi07wpEjwOsTuZAl/X070K3QZ51e1k99ei h4q8clXW5J1bTMOjkaeArifUsQ6zlz2dcAdIEo5iU4um0oLu1Gt7nDWPT6pjZwiy4AnG HAJwDIC/Xt7+s/VPCshBbqNDQ4L1w4gjdMgpEQzTo8t5V8obH/1fKLGvAEs/5/pP5d7m 4g2n2dBbWw3Q92FlZ9nWPSU42QOH1RkQ+8lMyh1RJx6HqXgxrY9J2BS4T0q5+7kFbNXc S2Sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ErG3bkvK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id im16-20020a170902bb1000b001e54fde0130si1076978plb.405.2024.04.30.13.14.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 13:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3103-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=@kernel.org header.s=k20201202 header.b=ErG3bkvK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3103-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 AC7B6B24E81 for ; Tue, 30 Apr 2024 20:05:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C39CD199E99; Tue, 30 Apr 2024 20:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ErG3bkvK" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9EBF817B514 for ; Tue, 30 Apr 2024 20:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714507527; cv=none; b=eEkRnK3y1rKB6E7zw7TgsxDki5u8fJM//X+y5Wis/FEI1R5O1BFMi12eKZMTd/d7qeMWBWvTNR2jr40iW0E0NBmDzhSFS/BCEA99Zel3qK24oZMe1ql802S9OdNw8HMT7ukTgIlHyhcXtN0EEAMgeOu0BUb/UAqUaXxis+JhCD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714507527; c=relaxed/simple; bh=5dw2QXOvxwfdU6Zq/Ka75EdsxoVWA6qT9j2ijF0XgYE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=oZB+WDS1CQ5VwdsqG/MQDq4YBE8NnOhM4o9ne3J9EjRPFkdumw1IPc4YuDG5z0QAtSN9RSoagSEmOwVo+zQ61fL4IpWDakbaRrIUO/btmZEPlbw/Yp35i+LkM4eOtgNDhKmk/7lKUBGOEkrLsft0av8t5ourekAHASR0ac0dvBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ErG3bkvK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D84F3C2BBFC; Tue, 30 Apr 2024 20:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714507527; bh=5dw2QXOvxwfdU6Zq/Ka75EdsxoVWA6qT9j2ijF0XgYE=; h=From:To:Cc:Subject:Date:From; b=ErG3bkvKsURy7aO9FCIWYNKzu7vYoSmlfd+z+HpCcsFrwqGj3TkwiXf4lwnXf1w7c 63msatp1E2ZW+Am+fLam+QWS+FGs4L1rEkGmROxoZupiQGaH3FTNGTWENNqbgJor9w bQs1N1qK5qvAojjr5Id9MweOimq+IF9SDczJEyx2A0rplQs6fkieODKZzatJ9pfWe8 VofjM7c4/tm1cn7ADYkQIIwh85wltsw6rQkz/BcrdJHttojNtZxD1kfxaWNcjYRLiv DePX1k5BOaOqIS95N7Esl/YRIfY8HjTsSQEIkAxMtq3y2kXQjZyjW+a9lV9oWmultM C1EsypyGpxTBw== From: cel@kernel.org To: Cc: Chuck Lever Subject: [RFC PATCH 0/2] NFSD: expand the implementation of OFFLOAD_STATUS Date: Tue, 30 Apr 2024 16:05:09 -0400 Message-ID: <20240430200519.6253-1-cel@kernel.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Chuck Lever I'm looking at RFC 7862 to try to understand what the various OFFLOAD_STATUS responses mean. > 15.9.3. DESCRIPTION > > OFFLOAD_STATUS can be used by the client to query the progress of an > asynchronous operation, which is identified by both CURRENT_FH and > the osa_stateid. If this operation is successful, the number of > bytes processed is returned to the client in the osr_count field. NFSD returns only the byte count today. > If the optional osr_complete field is present, the asynchronous > operation has completed. In this case, the status value indicates > the result of the asynchronous operation. NFSD currently never returns the status code -- NFSD's response XDR encoder always stuffs "zero" in the array count for the osr_complete array. IMO, zero is OK, but only for the “COPY is still running” case. Once the async COPY has completed, a subsequent OFFLOAD_STATUS should show that the COPY succeeded (or failed), until the server receives the client’s CB_OFFLOAD reply, or until the client’s lease expires. For the "COPY has completed successfully" case, the above text suggests that OFFLOAD_STATUS returns NFS4_OK, and needs to return a proper status code in the osr_complete array: Probably NFS4_OK. A "COPY has completed but failed" status can be reported by OFFLOAD_STATUS returning NFS4_OK and setting the osr_complete field to the failing COPY status code. The two patches here change NFSD in that direction. Chuck Lever (2): NFSD: Record status of async copy operation in struct nfsd4_copy NFSD: Add COPY status code to OFFLOAD_STATUS response fs/nfsd/nfs4proc.c | 31 ++++++++++++++++++------------- fs/nfsd/nfs4xdr.c | 7 ++++++- fs/nfsd/xdr4.h | 5 ++++- 3 files changed, 28 insertions(+), 15 deletions(-) base-commit: 06cd86b25b980a58e5584e9cd38c080467b24c25 -- 2.44.0