public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: cel@kernel.org
To: Olga Kornievskaia <okorniev@redhat.com>,
	Anna Schumaker <anna@kernel.org>
Cc: <linux-nfs@vger.kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v1 1/7] NFS: CB_OFFLOAD can return NFS4ERR_DELAY
Date: Tue,  3 Dec 2024 11:29:10 -0500	[thread overview]
Message-ID: <20241203162908.302354-10-cel@kernel.org> (raw)
In-Reply-To: <20241203162908.302354-9-cel@kernel.org>

From: Chuck Lever <chuck.lever@oracle.com>

RFC 7862 permits the callback service to respond to a CB_OFFLOAD
operation with NFS4ERR_DELAY. Use that instead of
NFS4ERR_SERVERFAULT for temporary memory allocation failure, as that
is more consistent with how other operations report memory
allocation failure.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfs/callback_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 7832fb0369a1..8397c43358bd 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -718,7 +718,7 @@ __be32 nfs4_callback_offload(void *data, void *dummy,
 
 	copy = kzalloc(sizeof(struct nfs4_copy_state), GFP_KERNEL);
 	if (!copy)
-		return htonl(NFS4ERR_SERVERFAULT);
+		return cpu_to_be32(NFS4ERR_DELAY);
 
 	spin_lock(&cps->clp->cl_lock);
 	rcu_read_lock();
-- 
2.47.0


  reply	other threads:[~2024-12-03 16:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 16:29 [PATCH v1 0/7] Client-side OFFLOAD_STATUS implementation cel
2024-12-03 16:29 ` cel [this message]
2024-12-03 16:29 ` [PATCH v1 2/7] NFS: Fix typo in OFFLOAD_CANCEL comment cel
2024-12-03 16:29 ` [PATCH v1 3/7] NFS: Rename struct nfs4_offloadcancel_data cel
2024-12-03 16:29 ` [PATCH v1 4/7] NFS: Implement NFSv4.2's OFFLOAD_STATUS XDR cel
2024-12-03 16:29 ` [PATCH v1 5/7] NFS: Implement NFSv4.2's OFFLOAD_STATUS operation cel
2024-12-13  0:39   ` Olga Kornievskaia
2024-12-13 18:40     ` Chuck Lever
2024-12-03 16:29 ` [PATCH v1 6/7] NFS: Use " cel
2024-12-03 16:29 ` [PATCH v1 7/7] NFS: Refactor trace_nfs4_offload_cancel cel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241203162908.302354-10-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=okorniev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox