Skip to content

Commit 24717cf

Browse files
committed
Merge tag 'nfsd-5.10' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields: "The one new feature this time, from Anna Schumaker, is READ_PLUS, which has the same arguments as READ but allows the server to return an array of data and hole extents. Otherwise it's a lot of cleanup and bugfixes" * tag 'nfsd-5.10' of git://linux-nfs.org/~bfields/linux: (43 commits) NFSv4.2: Fix NFS4ERR_STALE error when doing inter server copy SUNRPC: fix copying of multiple pages in gss_read_proxy_verf() sunrpc: raise kernel RPC channel buffer size svcrdma: fix bounce buffers for unaligned offsets and multiple pages nfsd: remove unneeded break net/sunrpc: Fix return value for sysctl sunrpc.transports NFSD: Encode a full READ_PLUS reply NFSD: Return both a hole and a data segment NFSD: Add READ_PLUS hole segment encoding NFSD: Add READ_PLUS data support NFSD: Hoist status code encoding into XDR encoder functions NFSD: Map nfserr_wrongsec outside of nfsd_dispatch NFSD: Remove the RETURN_STATUS() macro NFSD: Call NFSv2 encoders on error returns NFSD: Fix .pc_release method for NFSv2 NFSD: Remove vestigial typedefs NFSD: Refactor nfsd_dispatch() error paths NFSD: Clean up nfsd_dispatch() variables NFSD: Clean up stale comments in nfsd_dispatch() NFSD: Clean up switch statement in nfsd_dispatch() ...
2 parents 9b06f57 + 0cfcd40 commit 24717cf

44 files changed

Lines changed: 1490 additions & 1368 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/admin-guide/nfs/fault_injection.rst‎

Lines changed: 0 additions & 70 deletions
This file was deleted.

‎Documentation/admin-guide/nfs/index.rst‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ NFS
1212
nfs-idmapper
1313
pnfs-block-server
1414
pnfs-scsi-server
15-
fault_injection

‎Documentation/filesystems/nfs/rpc-server-gss.rst‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ RPCGSS is specified in a few IETF documents:
1313
- RFC2203 v1: https://tools.ietf.org/rfc/rfc2203.txt
1414
- RFC5403 v2: https://tools.ietf.org/rfc/rfc5403.txt
1515

16-
and there is a 3rd version being proposed:
16+
There is a third version that we don't currently implement:
1717

18-
- https://tools.ietf.org/id/draft-williams-rpcsecgssv3.txt
19-
(At draft n. 02 at the time of writing)
18+
- RFC7861 v3: https://tools.ietf.org/rfc/rfc7861.txt
2019

2120
Background
2221
==========

‎MAINTAINERS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9556,6 +9556,7 @@ F: include/linux/sunrpc/
95569556
F: include/uapi/linux/nfsd/
95579557
F: include/uapi/linux/sunrpc/
95589558
F: net/sunrpc/
9559+
F: Documentation/filesystems/nfs/
95599560

95609561
KERNEL SELFTEST FRAMEWORK
95619562
M: Shuah Khan <shuah@kernel.org>
@@ -12337,6 +12338,7 @@ F: include/linux/sunrpc/
1233712338
F: include/uapi/linux/nfs*
1233812339
F: include/uapi/linux/sunrpc/
1233912340
F: net/sunrpc/
12341+
F: Documentation/filesystems/nfs/
1234012342

1234112343
NILFS2 FILESYSTEM
1234212344
M: Ryusuke Konishi <konishi.ryusuke@gmail.com>

‎fs/lockd/svc4proc.c‎

Lines changed: 199 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -486,65 +486,215 @@ nlm4svc_proc_granted_res(struct svc_rqst *rqstp)
486486
return rpc_success;
487487
}
488488

489+
static __be32
490+
nlm4svc_proc_unused(struct svc_rqst *rqstp)
491+
{
492+
return rpc_proc_unavail;
493+
}
494+
489495

490496
/*
491497
* NLM Server procedures.
492498
*/
493499

494-
#define nlm4svc_encode_norep nlm4svc_encode_void
495-
#define nlm4svc_decode_norep nlm4svc_decode_void
496-
#define nlm4svc_decode_testres nlm4svc_decode_void
497-
#define nlm4svc_decode_lockres nlm4svc_decode_void
498-
#define nlm4svc_decode_unlockres nlm4svc_decode_void
499-
#define nlm4svc_decode_cancelres nlm4svc_decode_void
500-
#define nlm4svc_decode_grantedres nlm4svc_decode_void
501-
502-
#define nlm4svc_proc_none nlm4svc_proc_null
503-
#define nlm4svc_proc_test_res nlm4svc_proc_null
504-
#define nlm4svc_proc_lock_res nlm4svc_proc_null
505-
#define nlm4svc_proc_cancel_res nlm4svc_proc_null
506-
#define nlm4svc_proc_unlock_res nlm4svc_proc_null
507-
508500
struct nlm_void { int dummy; };
509501

510-
#define PROC(name, xargt, xrest, argt, rest, respsize) \
511-
{ .pc_func = nlm4svc_proc_##name, \
512-
.pc_decode = nlm4svc_decode_##xargt, \
513-
.pc_encode = nlm4svc_encode_##xrest, \
514-
.pc_release = NULL, \
515-
.pc_argsize = sizeof(struct nlm_##argt), \
516-
.pc_ressize = sizeof(struct nlm_##rest), \
517-
.pc_xdrressize = respsize, \
518-
}
519502
#define Ck (1+XDR_QUADLEN(NLM_MAXCOOKIELEN)) /* cookie */
520503
#define No (1+1024/4) /* netobj */
521504
#define St 1 /* status */
522505
#define Rg 4 /* range (offset + length) */
523-
const struct svc_procedure nlmsvc_procedures4[] = {
524-
PROC(null, void, void, void, void, 1),
525-
PROC(test, testargs, testres, args, res, Ck+St+2+No+Rg),
526-
PROC(lock, lockargs, res, args, res, Ck+St),
527-
PROC(cancel, cancargs, res, args, res, Ck+St),
528-
PROC(unlock, unlockargs, res, args, res, Ck+St),
529-
PROC(granted, testargs, res, args, res, Ck+St),
530-
PROC(test_msg, testargs, norep, args, void, 1),
531-
PROC(lock_msg, lockargs, norep, args, void, 1),
532-
PROC(cancel_msg, cancargs, norep, args, void, 1),
533-
PROC(unlock_msg, unlockargs, norep, args, void, 1),
534-
PROC(granted_msg, testargs, norep, args, void, 1),
535-
PROC(test_res, testres, norep, res, void, 1),
536-
PROC(lock_res, lockres, norep, res, void, 1),
537-
PROC(cancel_res, cancelres, norep, res, void, 1),
538-
PROC(unlock_res, unlockres, norep, res, void, 1),
539-
PROC(granted_res, res, norep, res, void, 1),
540-
/* statd callback */
541-
PROC(sm_notify, reboot, void, reboot, void, 1),
542-
PROC(none, void, void, void, void, 0),
543-
PROC(none, void, void, void, void, 0),
544-
PROC(none, void, void, void, void, 0),
545-
PROC(share, shareargs, shareres, args, res, Ck+St+1),
546-
PROC(unshare, shareargs, shareres, args, res, Ck+St+1),
547-
PROC(nm_lock, lockargs, res, args, res, Ck+St),
548-
PROC(free_all, notify, void, args, void, 1),
549506

507+
const struct svc_procedure nlmsvc_procedures4[24] = {
508+
[NLMPROC_NULL] = {
509+
.pc_func = nlm4svc_proc_null,
510+
.pc_decode = nlm4svc_decode_void,
511+
.pc_encode = nlm4svc_encode_void,
512+
.pc_argsize = sizeof(struct nlm_void),
513+
.pc_ressize = sizeof(struct nlm_void),
514+
.pc_xdrressize = St,
515+
},
516+
[NLMPROC_TEST] = {
517+
.pc_func = nlm4svc_proc_test,
518+
.pc_decode = nlm4svc_decode_testargs,
519+
.pc_encode = nlm4svc_encode_testres,
520+
.pc_argsize = sizeof(struct nlm_args),
521+
.pc_ressize = sizeof(struct nlm_res),
522+
.pc_xdrressize = Ck+St+2+No+Rg,
523+
},
524+
[NLMPROC_LOCK] = {
525+
.pc_func = nlm4svc_proc_lock,
526+
.pc_decode = nlm4svc_decode_lockargs,
527+
.pc_encode = nlm4svc_encode_res,
528+
.pc_argsize = sizeof(struct nlm_args),
529+
.pc_ressize = sizeof(struct nlm_res),
530+
.pc_xdrressize = Ck+St,
531+
},
532+
[NLMPROC_CANCEL] = {
533+
.pc_func = nlm4svc_proc_cancel,
534+
.pc_decode = nlm4svc_decode_cancargs,
535+
.pc_encode = nlm4svc_encode_res,
536+
.pc_argsize = sizeof(struct nlm_args),
537+
.pc_ressize = sizeof(struct nlm_res),
538+
.pc_xdrressize = Ck+St,
539+
},
540+
[NLMPROC_UNLOCK] = {
541+
.pc_func = nlm4svc_proc_unlock,
542+
.pc_decode = nlm4svc_decode_unlockargs,
543+
.pc_encode = nlm4svc_encode_res,
544+
.pc_argsize = sizeof(struct nlm_args),
545+
.pc_ressize = sizeof(struct nlm_res),
546+
.pc_xdrressize = Ck+St,
547+
},
548+
[NLMPROC_GRANTED] = {
549+
.pc_func = nlm4svc_proc_granted,
550+
.pc_decode = nlm4svc_decode_testargs,
551+
.pc_encode = nlm4svc_encode_res,
552+
.pc_argsize = sizeof(struct nlm_args),
553+
.pc_ressize = sizeof(struct nlm_res),
554+
.pc_xdrressize = Ck+St,
555+
},
556+
[NLMPROC_TEST_MSG] = {
557+
.pc_func = nlm4svc_proc_test_msg,
558+
.pc_decode = nlm4svc_decode_testargs,
559+
.pc_encode = nlm4svc_encode_void,
560+
.pc_argsize = sizeof(struct nlm_args),
561+
.pc_ressize = sizeof(struct nlm_void),
562+
.pc_xdrressize = St,
563+
},
564+
[NLMPROC_LOCK_MSG] = {
565+
.pc_func = nlm4svc_proc_lock_msg,
566+
.pc_decode = nlm4svc_decode_lockargs,
567+
.pc_encode = nlm4svc_encode_void,
568+
.pc_argsize = sizeof(struct nlm_args),
569+
.pc_ressize = sizeof(struct nlm_void),
570+
.pc_xdrressize = St,
571+
},
572+
[NLMPROC_CANCEL_MSG] = {
573+
.pc_func = nlm4svc_proc_cancel_msg,
574+
.pc_decode = nlm4svc_decode_cancargs,
575+
.pc_encode = nlm4svc_encode_void,
576+
.pc_argsize = sizeof(struct nlm_args),
577+
.pc_ressize = sizeof(struct nlm_void),
578+
.pc_xdrressize = St,
579+
},
580+
[NLMPROC_UNLOCK_MSG] = {
581+
.pc_func = nlm4svc_proc_unlock_msg,
582+
.pc_decode = nlm4svc_decode_unlockargs,
583+
.pc_encode = nlm4svc_encode_void,
584+
.pc_argsize = sizeof(struct nlm_args),
585+
.pc_ressize = sizeof(struct nlm_void),
586+
.pc_xdrressize = St,
587+
},
588+
[NLMPROC_GRANTED_MSG] = {
589+
.pc_func = nlm4svc_proc_granted_msg,
590+
.pc_decode = nlm4svc_decode_testargs,
591+
.pc_encode = nlm4svc_encode_void,
592+
.pc_argsize = sizeof(struct nlm_args),
593+
.pc_ressize = sizeof(struct nlm_void),
594+
.pc_xdrressize = St,
595+
},
596+
[NLMPROC_TEST_RES] = {
597+
.pc_func = nlm4svc_proc_null,
598+
.pc_decode = nlm4svc_decode_void,
599+
.pc_encode = nlm4svc_encode_void,
600+
.pc_argsize = sizeof(struct nlm_res),
601+
.pc_ressize = sizeof(struct nlm_void),
602+
.pc_xdrressize = St,
603+
},
604+
[NLMPROC_LOCK_RES] = {
605+
.pc_func = nlm4svc_proc_null,
606+
.pc_decode = nlm4svc_decode_void,
607+
.pc_encode = nlm4svc_encode_void,
608+
.pc_argsize = sizeof(struct nlm_res),
609+
.pc_ressize = sizeof(struct nlm_void),
610+
.pc_xdrressize = St,
611+
},
612+
[NLMPROC_CANCEL_RES] = {
613+
.pc_func = nlm4svc_proc_null,
614+
.pc_decode = nlm4svc_decode_void,
615+
.pc_encode = nlm4svc_encode_void,
616+
.pc_argsize = sizeof(struct nlm_res),
617+
.pc_ressize = sizeof(struct nlm_void),
618+
.pc_xdrressize = St,
619+
},
620+
[NLMPROC_UNLOCK_RES] = {
621+
.pc_func = nlm4svc_proc_null,
622+
.pc_decode = nlm4svc_decode_void,
623+
.pc_encode = nlm4svc_encode_void,
624+
.pc_argsize = sizeof(struct nlm_res),
625+
.pc_ressize = sizeof(struct nlm_void),
626+
.pc_xdrressize = St,
627+
},
628+
[NLMPROC_GRANTED_RES] = {
629+
.pc_func = nlm4svc_proc_granted_res,
630+
.pc_decode = nlm4svc_decode_res,
631+
.pc_encode = nlm4svc_encode_void,
632+
.pc_argsize = sizeof(struct nlm_res),
633+
.pc_ressize = sizeof(struct nlm_void),
634+
.pc_xdrressize = St,
635+
},
636+
[NLMPROC_NSM_NOTIFY] = {
637+
.pc_func = nlm4svc_proc_sm_notify,
638+
.pc_decode = nlm4svc_decode_reboot,
639+
.pc_encode = nlm4svc_encode_void,
640+
.pc_argsize = sizeof(struct nlm_reboot),
641+
.pc_ressize = sizeof(struct nlm_void),
642+
.pc_xdrressize = St,
643+
},
644+
[17] = {
645+
.pc_func = nlm4svc_proc_unused,
646+
.pc_decode = nlm4svc_decode_void,
647+
.pc_encode = nlm4svc_encode_void,
648+
.pc_argsize = sizeof(struct nlm_void),
649+
.pc_ressize = sizeof(struct nlm_void),
650+
.pc_xdrressize = 0,
651+
},
652+
[18] = {
653+
.pc_func = nlm4svc_proc_unused,
654+
.pc_decode = nlm4svc_decode_void,
655+
.pc_encode = nlm4svc_encode_void,
656+
.pc_argsize = sizeof(struct nlm_void),
657+
.pc_ressize = sizeof(struct nlm_void),
658+
.pc_xdrressize = 0,
659+
},
660+
[19] = {
661+
.pc_func = nlm4svc_proc_unused,
662+
.pc_decode = nlm4svc_decode_void,
663+
.pc_encode = nlm4svc_encode_void,
664+
.pc_argsize = sizeof(struct nlm_void),
665+
.pc_ressize = sizeof(struct nlm_void),
666+
.pc_xdrressize = 0,
667+
},
668+
[NLMPROC_SHARE] = {
669+
.pc_func = nlm4svc_proc_share,
670+
.pc_decode = nlm4svc_decode_shareargs,
671+
.pc_encode = nlm4svc_encode_shareres,
672+
.pc_argsize = sizeof(struct nlm_args),
673+
.pc_ressize = sizeof(struct nlm_res),
674+
.pc_xdrressize = Ck+St+1,
675+
},
676+
[NLMPROC_UNSHARE] = {
677+
.pc_func = nlm4svc_proc_unshare,
678+
.pc_decode = nlm4svc_decode_shareargs,
679+
.pc_encode = nlm4svc_encode_shareres,
680+
.pc_argsize = sizeof(struct nlm_args),
681+
.pc_ressize = sizeof(struct nlm_res),
682+
.pc_xdrressize = Ck+St+1,
683+
},
684+
[NLMPROC_NM_LOCK] = {
685+
.pc_func = nlm4svc_proc_nm_lock,
686+
.pc_decode = nlm4svc_decode_lockargs,
687+
.pc_encode = nlm4svc_encode_res,
688+
.pc_argsize = sizeof(struct nlm_args),
689+
.pc_ressize = sizeof(struct nlm_res),
690+
.pc_xdrressize = Ck+St,
691+
},
692+
[NLMPROC_FREE_ALL] = {
693+
.pc_func = nlm4svc_proc_free_all,
694+
.pc_decode = nlm4svc_decode_notify,
695+
.pc_encode = nlm4svc_encode_void,
696+
.pc_argsize = sizeof(struct nlm_args),
697+
.pc_ressize = sizeof(struct nlm_void),
698+
.pc_xdrressize = St,
699+
},
550700
};

0 commit comments

Comments
 (0)