diff mbox series

[05/14] nfsd: add defines for NFSv4.2 extended attribute support

Message ID 20200311195954.27117-6-fllinden@amazon.com (mailing list archive)
State New, archived
Headers show
Series server side user xattr support (RFC 8276) | expand

Commit Message

Frank van der Linden March 11, 2020, 7:59 p.m. UTC
Add defines for server-side extended attribute support. Most have
already been added as part of client support, but these are
the network order error codes for the noxattr and xattr2big errors,
and the addition of the xattr support to the supported file
attributes (if configured).

Signed-off-by: Frank van der Linden <fllinden@amazon.com>
---
 fs/nfsd/nfsd.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Chuck Lever III March 12, 2020, 4:23 p.m. UTC | #1
> On Mar 11, 2020, at 3:59 PM, Frank van der Linden <fllinden@amazon.com> wrote:
> 
> Add defines for server-side extended attribute support. Most have
> already been added as part of client support, but these are
> the network order error codes for the noxattr and xattr2big errors,
> and the addition of the xattr support to the supported file
> attributes (if configured).
> 
> Signed-off-by: Frank van der Linden <fllinden@amazon.com>
> ---
> fs/nfsd/nfsd.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
> index 2ab5569126b8..362d481b28c9 100644
> --- a/fs/nfsd/nfsd.h
> +++ b/fs/nfsd/nfsd.h
> @@ -281,6 +281,8 @@ void		nfsd_lockd_shutdown(void);
> #define nfserr_wrong_lfs		cpu_to_be32(NFS4ERR_WRONG_LFS)
> #define nfserr_badlabel			cpu_to_be32(NFS4ERR_BADLABEL)
> #define nfserr_file_open		cpu_to_be32(NFS4ERR_FILE_OPEN)
> +#define nfserr_xattr2big		cpu_to_be32(NFS4ERR_XATTR2BIG)
> +#define nfserr_noxattr			cpu_to_be32(NFS4ERR_NOXATTR)

Not clear to me why these shouldn't go into 01/14


> /* error codes for internal use */
> /* if a request fails due to kmalloc failure, it gets dropped.
> @@ -382,7 +384,8 @@ void		nfsd_lockd_shutdown(void);
> 	(NFSD4_1_SUPPORTED_ATTRS_WORD2 | \
> 	FATTR4_WORD2_CHANGE_ATTR_TYPE | \
> 	FATTR4_WORD2_MODE_UMASK | \
> -	NFSD4_2_SECURITY_ATTRS)
> +	NFSD4_2_SECURITY_ATTRS | \
> +	FATTR4_WORD2_XATTR_SUPPORT)

Should this instead be added, say, in 14/14 ?


> extern const u32 nfsd_suppattrs[3][3];
> 
> -- 
> 2.16.6
> 

--
Chuck Lever
diff mbox series

Patch

diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 2ab5569126b8..362d481b28c9 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -281,6 +281,8 @@  void		nfsd_lockd_shutdown(void);
 #define nfserr_wrong_lfs		cpu_to_be32(NFS4ERR_WRONG_LFS)
 #define nfserr_badlabel			cpu_to_be32(NFS4ERR_BADLABEL)
 #define nfserr_file_open		cpu_to_be32(NFS4ERR_FILE_OPEN)
+#define nfserr_xattr2big		cpu_to_be32(NFS4ERR_XATTR2BIG)
+#define nfserr_noxattr			cpu_to_be32(NFS4ERR_NOXATTR)
 
 /* error codes for internal use */
 /* if a request fails due to kmalloc failure, it gets dropped.
@@ -382,7 +384,8 @@  void		nfsd_lockd_shutdown(void);
 	(NFSD4_1_SUPPORTED_ATTRS_WORD2 | \
 	FATTR4_WORD2_CHANGE_ATTR_TYPE | \
 	FATTR4_WORD2_MODE_UMASK | \
-	NFSD4_2_SECURITY_ATTRS)
+	NFSD4_2_SECURITY_ATTRS | \
+	FATTR4_WORD2_XATTR_SUPPORT)
 
 extern const u32 nfsd_suppattrs[3][3];