History

Merge tag 'nfsd-5.4' of git://linux-nfs.org/~bfields/linux

Pull nfsd updates from Bruce Fields: "Highlights: - Add a new knfsd file cache, so that we don't have to open and close on each (NFSv2/v3) READ or WRITE. This can speed up read and write in some cases. It also replaces our readahead cache. - Prevent silent data loss on write errors, by treating write errors like server reboots for the purposes of write caching, thus forcing clients to resend their writes. - Tweak the code that allocates sessions to be more forgiving, so that NFSv4.1 mounts are less likely to hang when a server already has a lot of clients. - Eliminate an arbitrary limit on NFSv4 ACL sizes; they should now be limited only by the backend filesystem and the maximum RPC size. - Allow the server to enforce use of the correct kerberos credentials when a client reclaims state after a reboot. And some miscellaneous smaller bugfixes and cleanup" * tag 'nfsd-5.4' of git://linux-nfs.org/~bfields/linux: (34 commits) sunrpc: clean up indentation issue nfsd: fix nfs read eof detection nfsd: Make nfsd_reset_boot_verifier_locked static nfsd: degraded slot-count more gracefully as allocation nears exhaustion. nfsd: handle drc over-allocation gracefully. nfsd: add support for upcall version 2 nfsd: add a "GetVersion" upcall for nfsdcld nfsd: Reset the boot verifier on all write I/O errors nfsd: Don't garbage collect files that might contain write errors nfsd: Support the server resetting the boot verifier nfsd: nfsd_file cache entries should be per net namespace nfsd: eliminate an unnecessary acl size limit Deprecate nfsd fault injection nfsd: remove duplicated include from filecache.c nfsd: Fix the documentation for svcxdr_tmpalloc() nfsd: Fix up some unused variable warnings nfsd: close cached files prior to a REMOVE or RENAME that would replace target nfsd: rip out the raparms cache nfsd: have nfsd_test_lock use the nfsd_file cache nfsd: hook up nfs4_preprocess_stateid_op to the nfsd_file cache ...

Linus Torvalds committed 7 years ago

Commit 298fb762 parents 8f744bd e41f9ef40 files · +2083 −600Browse files

Showing the changes to include/uapi (1 of 40 files). Show all

Unified · Split

include/uapi/linux/nfsd/cld.h+39−2
@@ -26,17 +26,22 @@ · 25 unmodified lines
2626 #include <linux/types.h>
2727
2828 /* latest upcall version available */
29−#define CLD_UPCALL_VERSION 1
29+#define CLD_UPCALL_VERSION 2
3030
3131 /* defined by RFC3530 */
3232 #define NFS4_OPAQUE_LIMIT 1024
3333
34+#ifndef SHA256_DIGEST_SIZE
35+#define SHA256_DIGEST_SIZE 32
36+#endif
37+
3438 enum cld_command {
3539 Cld_Create, /* create a record for this cm_id */
3640 Cld_Remove, /* remove record of this cm_id */
3741 Cld_Check, /* is this cm_id allowed? */
3842 Cld_GraceDone, /* grace period is complete */
39− Cld_GraceStart,
43+ Cld_GraceStart, /* grace start (upload client records) */
44+ Cld_GetVersion, /* query max supported upcall version */
4045 };
4146
4247 /* representation of long-form NFSv4 client ID */
@@ -45,6 +50,17 @@ struct cld_name { · 2 unmodified lines
4550 unsigned char cn_id[NFS4_OPAQUE_LIMIT]; /* client-provided */
4651 } __attribute__((packed));
4752
53+/* sha256 hash of the kerberos principal */
54+struct cld_princhash {
55+ __u8 cp_len; /* length of cp_data */
56+ unsigned char cp_data[SHA256_DIGEST_SIZE]; /* hash of principal */
57+} __attribute__((packed));
58+
59+struct cld_clntinfo {
60+ struct cld_name cc_name;
61+ struct cld_princhash cc_princhash;
62+} __attribute__((packed));
63+
4864 /* message struct for communication with userspace */
4965 struct cld_msg {
5066 __u8 cm_vers; /* upcall version */
@@ -54,7 +70,28 @@ struct cld_msg { · 3 unmodified lines
5470 union {
5571 __s64 cm_gracetime; /* grace period start time */
5672 struct cld_name cm_name;
73+ __u8 cm_version; /* for getting max version */
74+ } __attribute__((packed)) cm_u;
75+} __attribute__((packed));
76+
77+/* version 2 message can include hash of kerberos principal */
78+struct cld_msg_v2 {
79+ __u8 cm_vers; /* upcall version */
80+ __u8 cm_cmd; /* upcall command */
81+ __s16 cm_status; /* return code */
82+ __u32 cm_xid; /* transaction id */
83+ union {
84+ struct cld_name cm_name;
85+ __u8 cm_version; /* for getting max version */
86+ struct cld_clntinfo cm_clntinfo; /* name & princ hash */
5787 } __attribute__((packed)) cm_u;
5888 } __attribute__((packed));
5989
90+struct cld_msg_hdr {
91+ __u8 cm_vers; /* upcall version */
92+ __u8 cm_cmd; /* upcall command */
93+ __s16 cm_status; /* return code */
94+ __u32 cm_xid; /* transaction id */
95+} __attribute__((packed));
96+
6097 #endif /* !_NFSD_CLD_H */