Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfsd: discard nfserr_dropit
@ 2025-08-21  1:10 NeilBrown
  2025-08-21  3:50 ` NeilBrown
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: NeilBrown @ 2025-08-21  1:10 UTC (permalink / raw)
  To: Chuck Lever, Jeff Layton; +Cc: Olga Kornievskaia, linux-nfs



nfserr_dropit hasn't been used for over a decade, since rq_dropme and
the RQ_DROPME were introduced.

Time to get rid of it completely.

Signed-off-by: NeilBrown <neil@brown.name>
---
 fs/nfsd/lockd.c | 2 --
 fs/nfsd/nfsd.h  | 8 +-------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
index edc9f75dc75c..dca80f5de0ad 100644
--- a/fs/nfsd/lockd.c
+++ b/fs/nfsd/lockd.c
@@ -57,8 +57,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp,
 	switch (nfserr) {
 	case nfs_ok:
 		return 0;
-	case nfserr_dropit:
-		return nlm_drop_reply;
 	case nfserr_stale:
 		return nlm_stale_fh;
 	default:
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 1cd0bed57bc2..2c9fa884ab05 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -335,14 +335,8 @@ void		nfsd_lockd_shutdown(void);
  * cannot conflict with any existing be32 nfserr value.
  */
 enum {
-	NFSERR_DROPIT = NFS4ERR_FIRST_FREE,
-/* if a request fails due to kmalloc failure, it gets dropped.
- *  Client should resend eventually
- */
-#define	nfserr_dropit		cpu_to_be32(NFSERR_DROPIT)
-
 /* end-of-file indicator in readdir */
-	NFSERR_EOF,
+	NFSERR_EOF, = NFS4ERR_FIRST_FREE,
 #define	nfserr_eof		cpu_to_be32(NFSERR_EOF)
 
 /* replay detected */

-- 
2.50.0.107.gf914562f5916.dirty


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfsd: discard nfserr_dropit
  2025-08-21  1:10 [PATCH] nfsd: discard nfserr_dropit NeilBrown
@ 2025-08-21  3:50 ` NeilBrown
  2025-08-21 10:14 ` Jeff Layton
  2025-08-21 15:07 ` Chuck Lever
  2 siblings, 0 replies; 4+ messages in thread
From: NeilBrown @ 2025-08-21  3:50 UTC (permalink / raw)
  To: Chuck Lever, Jeff Layton; +Cc: Olga Kornievskaia, linux-nfs

On Thu, 21 Aug 2025, NeilBrown wrote:
> 
> nfserr_dropit hasn't been used for over a decade, since rq_dropme and
> the RQ_DROPME were introduced.
> 
> Time to get rid of it completely.
> 
> Signed-off-by: NeilBrown <neil@brown.name>
> ---
>  fs/nfsd/lockd.c | 2 --
>  fs/nfsd/nfsd.h  | 8 +-------
>  2 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
> index edc9f75dc75c..dca80f5de0ad 100644
> --- a/fs/nfsd/lockd.c
> +++ b/fs/nfsd/lockd.c
> @@ -57,8 +57,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp,
>  	switch (nfserr) {
>  	case nfs_ok:
>  		return 0;
> -	case nfserr_dropit:
> -		return nlm_drop_reply;
>  	case nfserr_stale:
>  		return nlm_stale_fh;
>  	default:
> diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
> index 1cd0bed57bc2..2c9fa884ab05 100644
> --- a/fs/nfsd/nfsd.h
> +++ b/fs/nfsd/nfsd.h
> @@ -335,14 +335,8 @@ void		nfsd_lockd_shutdown(void);
>   * cannot conflict with any existing be32 nfserr value.
>   */
>  enum {
> -	NFSERR_DROPIT = NFS4ERR_FIRST_FREE,
> -/* if a request fails due to kmalloc failure, it gets dropped.
> - *  Client should resend eventually
> - */
> -#define	nfserr_dropit		cpu_to_be32(NFSERR_DROPIT)
> -
>  /* end-of-file indicator in readdir */
> -	NFSERR_EOF,
> +	NFSERR_EOF, = NFS4ERR_FIRST_FREE,

                  ^

Please drop this incorrect comma.

NeilBrown


>  #define	nfserr_eof		cpu_to_be32(NFSERR_EOF)
>  
>  /* replay detected */
> 
> -- 
> 2.50.0.107.gf914562f5916.dirty
> 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfsd: discard nfserr_dropit
  2025-08-21  1:10 [PATCH] nfsd: discard nfserr_dropit NeilBrown
  2025-08-21  3:50 ` NeilBrown
@ 2025-08-21 10:14 ` Jeff Layton
  2025-08-21 15:07 ` Chuck Lever
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2025-08-21 10:14 UTC (permalink / raw)
  To: NeilBrown, Chuck Lever; +Cc: Olga Kornievskaia, linux-nfs

On Thu, 2025-08-21 at 11:10 +1000, NeilBrown wrote:
> 
> nfserr_dropit hasn't been used for over a decade, since rq_dropme and
> the RQ_DROPME were introduced.
> 
> Time to get rid of it completely.
> 
> Signed-off-by: NeilBrown <neil@brown.name>
> ---
>  fs/nfsd/lockd.c | 2 --
>  fs/nfsd/nfsd.h  | 8 +-------
>  2 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c
> index edc9f75dc75c..dca80f5de0ad 100644
> --- a/fs/nfsd/lockd.c
> +++ b/fs/nfsd/lockd.c
> @@ -57,8 +57,6 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp,
>  	switch (nfserr) {
>  	case nfs_ok:
>  		return 0;
> -	case nfserr_dropit:
> -		return nlm_drop_reply;
>  	case nfserr_stale:
>  		return nlm_stale_fh;
>  	default:
> diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
> index 1cd0bed57bc2..2c9fa884ab05 100644
> --- a/fs/nfsd/nfsd.h
> +++ b/fs/nfsd/nfsd.h
> @@ -335,14 +335,8 @@ void		nfsd_lockd_shutdown(void);
>   * cannot conflict with any existing be32 nfserr value.
>   */
>  enum {
> -	NFSERR_DROPIT = NFS4ERR_FIRST_FREE,
> -/* if a request fails due to kmalloc failure, it gets dropped.
> - *  Client should resend eventually
> - */
> -#define	nfserr_dropit		cpu_to_be32(NFSERR_DROPIT)
> -
>  /* end-of-file indicator in readdir */
> -	NFSERR_EOF,
> +	NFSERR_EOF, = NFS4ERR_FIRST_FREE,
>  #define	nfserr_eof		cpu_to_be32(NFSERR_EOF)
>  
>  /* replay detected */

Modulo the extra comma...

Reviewed-by: Jeff Layton <jlayton@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfsd: discard nfserr_dropit
  2025-08-21  1:10 [PATCH] nfsd: discard nfserr_dropit NeilBrown
  2025-08-21  3:50 ` NeilBrown
  2025-08-21 10:14 ` Jeff Layton
@ 2025-08-21 15:07 ` Chuck Lever
  2 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2025-08-21 15:07 UTC (permalink / raw)
  To: Jeff Layton, NeilBrown; +Cc: Chuck Lever, Olga Kornievskaia, linux-nfs

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

On Thu, 21 Aug 2025 11:10:41 +1000, NeilBrown wrote:
> nfserr_dropit hasn't been used for over a decade, since rq_dropme and
> the RQ_DROPME were introduced.
> 
> Time to get rid of it completely.
> 
> 

Applied to nfsd-testing, thanks!

[1/1] nfsd: discard nfserr_dropit
      commit: cefea648ea22cecc5311f10a322fb6e19c8bb257

--
Chuck Lever


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-21 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21  1:10 [PATCH] nfsd: discard nfserr_dropit NeilBrown
2025-08-21  3:50 ` NeilBrown
2025-08-21 10:14 ` Jeff Layton
2025-08-21 15:07 ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox