Commit 1631087b authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Chuck Lever
Browse files

Revert "nfsd4: support change_attr_type attribute"



This reverts commit a8585763.

We're still factoring ctime into our change attribute even in the
IS_I_VERSION case.  If someone sets the system time backwards, a client
could see the change attribute go backwards.  Maybe we can just say
"well, don't do that", but there's some question whether that's good
enough, or whether we need a better guarantee.

Also, the client still isn't actually using the attribute.

While we're still figuring this out, let's just stop returning this
attribute.

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 942b20dc
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -3311,16 +3311,6 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
			goto out;
	}

	if (bmval2 & FATTR4_WORD2_CHANGE_ATTR_TYPE) {
		p = xdr_reserve_space(xdr, 4);
		if (!p)
			goto out_resource;
		if (IS_I_VERSION(d_inode(dentry)))
			*p++ = cpu_to_be32(NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR);
		else
			*p++ = cpu_to_be32(NFS4_CHANGE_TYPE_IS_TIME_METADATA);
	}

#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
	if (bmval2 & FATTR4_WORD2_SECURITY_LABEL) {
		status = nfsd4_encode_security_label(xdr, rqstp, context,
+0 −1
Original line number Diff line number Diff line
@@ -395,7 +395,6 @@ void nfsd_lockd_shutdown(void);

#define NFSD4_2_SUPPORTED_ATTRS_WORD2 \
	(NFSD4_1_SUPPORTED_ATTRS_WORD2 | \
	FATTR4_WORD2_CHANGE_ATTR_TYPE | \
	FATTR4_WORD2_MODE_UMASK | \
	NFSD4_2_SECURITY_ATTRS | \
	FATTR4_WORD2_XATTR_SUPPORT)
+0 −8
Original line number Diff line number Diff line
@@ -385,13 +385,6 @@ enum lock_type4 {
	NFS4_WRITEW_LT = 4
};

enum change_attr_type4 {
	NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0,
	NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1,
	NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2,
	NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3,
	NFS4_CHANGE_TYPE_IS_UNDEFINED = 4
};

/* Mandatory Attributes */
#define FATTR4_WORD0_SUPPORTED_ATTRS    (1UL << 0)
@@ -459,7 +452,6 @@ enum change_attr_type4 {
#define FATTR4_WORD2_LAYOUT_BLKSIZE     (1UL << 1)
#define FATTR4_WORD2_MDSTHRESHOLD       (1UL << 4)
#define FATTR4_WORD2_CLONE_BLKSIZE	(1UL << 13)
#define FATTR4_WORD2_CHANGE_ATTR_TYPE	(1UL << 15)
#define FATTR4_WORD2_SECURITY_LABEL     (1UL << 16)
#define FATTR4_WORD2_MODE_UMASK		(1UL << 17)
#define FATTR4_WORD2_XATTR_SUPPORT	(1UL << 18)