Commit 8c10cbdb authored by Benny Halevy's avatar Benny Halevy Committed by J. Bruce Fields

nfsd: use STATEID_FMT and STATEID_VAL for printing stateids

Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 1b7e0403
...@@ -2416,11 +2416,8 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta ...@@ -2416,11 +2416,8 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid)); memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid));
dprintk("NFSD: delegation stateid=(%08x/%08x/%08x/%08x)\n\n", dprintk("NFSD: delegation stateid=" STATEID_FMT "\n",
dp->dl_stateid.si_boot, STATEID_VAL(&dp->dl_stateid));
dp->dl_stateid.si_stateownerid,
dp->dl_stateid.si_fileid,
dp->dl_stateid.si_generation);
out: out:
if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS
&& flag == NFS4_OPEN_DELEGATE_NONE && flag == NFS4_OPEN_DELEGATE_NONE
...@@ -2510,9 +2507,8 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf ...@@ -2510,9 +2507,8 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
status = nfs_ok; status = nfs_ok;
dprintk("nfs4_process_open2: stateid=(%08x/%08x/%08x/%08x)\n", dprintk("%s: stateid=" STATEID_FMT "\n", __func__,
stp->st_stateid.si_boot, stp->st_stateid.si_stateownerid, STATEID_VAL(&stp->st_stateid));
stp->st_stateid.si_fileid, stp->st_stateid.si_generation);
out: out:
if (fp) if (fp)
put_nfs4_file(fp); put_nfs4_file(fp);
...@@ -2678,9 +2674,8 @@ STALE_STATEID(stateid_t *stateid) ...@@ -2678,9 +2674,8 @@ STALE_STATEID(stateid_t *stateid)
{ {
if (time_after((unsigned long)boot_time, if (time_after((unsigned long)boot_time,
(unsigned long)stateid->si_boot)) { (unsigned long)stateid->si_boot)) {
dprintk("NFSD: stale stateid (%08x/%08x/%08x/%08x)!\n", dprintk("NFSD: stale stateid " STATEID_FMT "!\n",
stateid->si_boot, stateid->si_stateownerid, STATEID_VAL(stateid));
stateid->si_fileid, stateid->si_generation);
return 1; return 1;
} }
return 0; return 0;
...@@ -2692,9 +2687,8 @@ EXPIRED_STATEID(stateid_t *stateid) ...@@ -2692,9 +2687,8 @@ EXPIRED_STATEID(stateid_t *stateid)
if (time_before((unsigned long)boot_time, if (time_before((unsigned long)boot_time,
((unsigned long)stateid->si_boot)) && ((unsigned long)stateid->si_boot)) &&
time_before((unsigned long)(stateid->si_boot + lease_time), get_seconds())) { time_before((unsigned long)(stateid->si_boot + lease_time), get_seconds())) {
dprintk("NFSD: expired stateid (%08x/%08x/%08x/%08x)!\n", dprintk("NFSD: expired stateid " STATEID_FMT "!\n",
stateid->si_boot, stateid->si_stateownerid, STATEID_VAL(stateid));
stateid->si_fileid, stateid->si_generation);
return 1; return 1;
} }
return 0; return 0;
...@@ -2708,9 +2702,8 @@ stateid_error_map(stateid_t *stateid) ...@@ -2708,9 +2702,8 @@ stateid_error_map(stateid_t *stateid)
if (EXPIRED_STATEID(stateid)) if (EXPIRED_STATEID(stateid))
return nfserr_expired; return nfserr_expired;
dprintk("NFSD: bad stateid (%08x/%08x/%08x/%08x)!\n", dprintk("NFSD: bad stateid " STATEID_FMT "!\n",
stateid->si_boot, stateid->si_stateownerid, STATEID_VAL(stateid));
stateid->si_fileid, stateid->si_generation);
return nfserr_bad_stateid; return nfserr_bad_stateid;
} }
...@@ -2896,10 +2889,8 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid, ...@@ -2896,10 +2889,8 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid,
struct svc_fh *current_fh = &cstate->current_fh; struct svc_fh *current_fh = &cstate->current_fh;
__be32 status; __be32 status;
dprintk("NFSD: preprocess_seqid_op: seqid=%d " dprintk("NFSD: %s: seqid=%d stateid = " STATEID_FMT "\n", __func__,
"stateid = (%08x/%08x/%08x/%08x)\n", seqid, seqid, STATEID_VAL(stateid));
stateid->si_boot, stateid->si_stateownerid, stateid->si_fileid,
stateid->si_generation);
*stpp = NULL; *stpp = NULL;
*sopp = NULL; *sopp = NULL;
...@@ -3031,12 +3022,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -3031,12 +3022,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
sop->so_confirmed = 1; sop->so_confirmed = 1;
update_stateid(&stp->st_stateid); update_stateid(&stp->st_stateid);
memcpy(&oc->oc_resp_stateid, &stp->st_stateid, sizeof(stateid_t)); memcpy(&oc->oc_resp_stateid, &stp->st_stateid, sizeof(stateid_t));
dprintk("NFSD: nfsd4_open_confirm: success, seqid=%d " dprintk("NFSD: %s: success, seqid=%d stateid=" STATEID_FMT "\n",
"stateid=(%08x/%08x/%08x/%08x)\n", oc->oc_seqid, __func__, oc->oc_seqid, STATEID_VAL(&stp->st_stateid));
stp->st_stateid.si_boot,
stp->st_stateid.si_stateownerid,
stp->st_stateid.si_fileid,
stp->st_stateid.si_generation);
nfsd4_create_clid_dir(sop->so_client); nfsd4_create_clid_dir(sop->so_client);
out: out:
...@@ -3295,9 +3282,8 @@ find_delegation_stateid(struct inode *ino, stateid_t *stid) ...@@ -3295,9 +3282,8 @@ find_delegation_stateid(struct inode *ino, stateid_t *stid)
struct nfs4_file *fp; struct nfs4_file *fp;
struct nfs4_delegation *dl; struct nfs4_delegation *dl;
dprintk("NFSD:find_delegation_stateid stateid=(%08x/%08x/%08x/%08x)\n", dprintk("NFSD: %s: stateid=" STATEID_FMT "\n", __func__,
stid->si_boot, stid->si_stateownerid, STATEID_VAL(stid));
stid->si_fileid, stid->si_generation);
fp = find_file(ino); fp = find_file(ino);
if (!fp) if (!fp)
......
...@@ -60,6 +60,13 @@ typedef struct { ...@@ -60,6 +60,13 @@ typedef struct {
#define si_stateownerid si_opaque.so_stateownerid #define si_stateownerid si_opaque.so_stateownerid
#define si_fileid si_opaque.so_fileid #define si_fileid si_opaque.so_fileid
#define STATEID_FMT "(%08x/%08x/%08x/%08x)"
#define STATEID_VAL(s) \
(s)->si_boot, \
(s)->si_stateownerid, \
(s)->si_fileid, \
(s)->si_generation
struct nfsd4_cb_sequence { struct nfsd4_cb_sequence {
/* args/res */ /* args/res */
u32 cbs_minorversion; u32 cbs_minorversion;
......
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