Commit 0e885e84 authored by Frank van der Linden's avatar Frank van der Linden Committed by Chuck Lever

nfsd: add fattr support for user extended attributes

Check if user extended attributes are supported for an inode,
and return the answer when being queried for file attributes.

An exported filesystem can now signal its RFC8276 user extended
attributes capability.
Signed-off-by: default avatarFrank van der Linden <fllinden@amazon.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 23e50fe3
......@@ -3213,6 +3213,15 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
}
#endif
if (bmval2 & FATTR4_WORD2_XATTR_SUPPORT) {
p = xdr_reserve_space(xdr, 4);
if (!p)
goto out_resource;
err = xattr_supported_namespace(d_inode(dentry),
XATTR_USER_PREFIX);
*p++ = cpu_to_be32(err == 0);
}
attrlen = htonl(xdr->buf->len - attrlen_offset - 4);
write_bytes_to_xdr_buf(xdr->buf, attrlen_offset, &attrlen, 4);
status = nfs_ok;
......
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