]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfs/nfs4_fs.h
Merge branch 'for-linus' into for-next
[linux.git] / fs / nfs / nfs4_fs.h
index 8e590b424d75baa6185dd3a14bf10109de7ea611..a7a73b1d1fec5e340d04c5afd23cbafaaf825fb5 100644 (file)
@@ -166,9 +166,9 @@ enum {
        NFS_STATE_RECOVERY_FAILED,      /* OPEN stateid state recovery failed */
        NFS_STATE_MAY_NOTIFY_LOCK,      /* server may CB_NOTIFY_LOCK */
        NFS_STATE_CHANGE_WAIT,          /* A state changing operation is outstanding */
-#ifdef CONFIG_NFS_V4_2
        NFS_CLNT_DST_SSC_COPY_STATE,    /* dst server open state on client*/
-#endif /* CONFIG_NFS_V4_2 */
+       NFS_CLNT_SRC_SSC_COPY_STATE,    /* src server open state on client*/
+       NFS_SRV_SSC_COPY_STATE,         /* ssc state on the dst server */
 };
 
 struct nfs4_state {
@@ -311,6 +311,13 @@ extern int nfs4_set_rw_stateid(nfs4_stateid *stateid,
                const struct nfs_open_context *ctx,
                const struct nfs_lock_context *l_ctx,
                fmode_t fmode);
+extern int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
+                            struct nfs_fattr *fattr, struct nfs4_label *label,
+                            struct inode *inode);
+extern int update_open_stateid(struct nfs4_state *state,
+                               const nfs4_stateid *open_stateid,
+                               const nfs4_stateid *deleg_stateid,
+                               fmode_t fmode);
 
 extern int nfs4_proc_get_lease_time(struct nfs_client *clp,
                struct nfs_fsinfo *fsinfo);
@@ -445,6 +452,8 @@ extern void nfs4_set_lease_period(struct nfs_client *clp,
 
 
 /* nfs4state.c */
+extern const nfs4_stateid current_stateid;
+
 const struct cred *nfs4_get_clid_cred(struct nfs_client *clp);
 const struct cred *nfs4_get_machine_cred(struct nfs_client *clp);
 const struct cred *nfs4_get_renew_cred(struct nfs_client *clp);
@@ -574,6 +583,12 @@ static inline bool nfs4_stateid_is_newer(const nfs4_stateid *s1, const nfs4_stat
        return (s32)(be32_to_cpu(s1->seqid) - be32_to_cpu(s2->seqid)) > 0;
 }
 
+static inline bool nfs4_stateid_match_or_older(const nfs4_stateid *dst, const nfs4_stateid *src)
+{
+       return nfs4_stateid_match_other(dst, src) &&
+               !(src->seqid && nfs4_stateid_is_newer(dst, src));
+}
+
 static inline void nfs4_stateid_seqid_inc(nfs4_stateid *s1)
 {
        u32 seqid = be32_to_cpu(s1->seqid);