#define ZERO_STATEID(stateid) (!memcmp((stateid), &zerostateid, sizeof(stateid_t)))
#define ONE_STATEID(stateid) (!memcmp((stateid), &onestateid, sizeof(stateid_t)))
-/* Delegation recall states */
-#define NFS4_NO_RECALL 0x000
-#define NFS4_RECALL_IN_PROGRESS 0x001
-#define NFS4_RECALL_COMPLETE 0x002
-#define NFS4_REAP_DELEG 0x004
-
struct nfs4_cb_recall {
u32 cbr_ident;
int cbr_trunc;
struct list_head dl_del_perfile; /* nfs4_file->fi_del_perfile */
struct list_head dl_del_perclnt; /* nfs4_client->cl_del_perclnt*/
struct list_head dl_recall_lru; /* delegation recalled */
- atomic_t dl_recall_cnt; /* resend cb_recall only once */
atomic_t dl_count; /* ref count */
- atomic_t dl_state; /* recall state */
struct nfs4_client *dl_client;
struct nfs4_file *dl_file;
struct file_lock *dl_flock;
- struct nfs4_stateid *dl_stp;
+ struct file *dl_vfs_file;
u32 dl_type;
time_t dl_time;
struct nfs4_cb_recall dl_recall;
clientid_t cl_clientid; /* generated by server */
nfs4_verifier cl_confirm; /* generated by server */
struct nfs4_callback cl_callback; /* callback info */
- time_t cl_first_state; /* first state aquisition*/
atomic_t cl_count; /* ref count */
};
struct nfs4_client_reclaim {
struct list_head cr_strhash; /* hash by cr_name */
struct xdr_netobj cr_name; /* id generated by client */
- time_t cr_first_state; /* first state aquisition */
- u32 cr_expired; /* boolean: lease expired? */
};
static inline void
struct nfs4_file * st_file;
stateid_t st_stateid;
struct file * st_vfs_file;
- int st_vfs_set;
unsigned long st_access_bmap;
unsigned long st_deny_bmap;
};
extern time_t nfs4_laundromat(void);
extern int nfsd4_renew(clientid_t *clid);
extern int nfs4_preprocess_stateid_op(struct svc_fh *current_fh,
- stateid_t *stateid, int flags);
+ stateid_t *stateid, int flags, struct file **filp);
extern int nfs4_share_conflict(struct svc_fh *current_fh,
unsigned int deny_type);
extern void nfs4_lock_state(void);
extern void put_nfs4_client(struct nfs4_client *clp);
extern void nfs4_free_stateowner(struct kref *kref);
extern void nfsd4_probe_callback(struct nfs4_client *clp);
-extern int nfsd4_cb_recall(struct nfs4_delegation *dp);
+extern void nfsd4_cb_recall(struct nfs4_delegation *dp);
+extern void nfs4_put_delegation(struct nfs4_delegation *dp);
static inline void
nfs4_put_stateowner(struct nfs4_stateowner *so)