Commit 11a60d15 authored by Scott Mayhew's avatar Scott Mayhew Committed by J. Bruce Fields

nfsd: add a "GetVersion" upcall for nfsdcld

Add a "GetVersion" upcall to allow nfsd to determine the maximum upcall
version that the nfsdcld userspace daemon supports.  If the daemon
responds with -EOPNOTSUPP, then we know it only supports v1.
Signed-off-by: default avatarScott Mayhew <smayhew@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent bbf2f098
This diff is collapsed.
...@@ -36,7 +36,8 @@ enum cld_command { ...@@ -36,7 +36,8 @@ enum cld_command {
Cld_Remove, /* remove record of this cm_id */ Cld_Remove, /* remove record of this cm_id */
Cld_Check, /* is this cm_id allowed? */ Cld_Check, /* is this cm_id allowed? */
Cld_GraceDone, /* grace period is complete */ Cld_GraceDone, /* grace period is complete */
Cld_GraceStart, Cld_GraceStart, /* grace start (upload client records) */
Cld_GetVersion, /* query max supported upcall version */
}; };
/* representation of long-form NFSv4 client ID */ /* representation of long-form NFSv4 client ID */
...@@ -54,7 +55,15 @@ struct cld_msg { ...@@ -54,7 +55,15 @@ struct cld_msg {
union { union {
__s64 cm_gracetime; /* grace period start time */ __s64 cm_gracetime; /* grace period start time */
struct cld_name cm_name; struct cld_name cm_name;
__u8 cm_version; /* for getting max version */
} __attribute__((packed)) cm_u; } __attribute__((packed)) cm_u;
} __attribute__((packed)); } __attribute__((packed));
struct cld_msg_hdr {
__u8 cm_vers; /* upcall version */
__u8 cm_cmd; /* upcall command */
__s16 cm_status; /* return code */
__u32 cm_xid; /* transaction id */
} __attribute__((packed));
#endif /* !_NFSD_CLD_H */ #endif /* !_NFSD_CLD_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment