aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-10-19 06:04:53 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-11-05 12:06:29 -0500
commit8c10cbdb4af642d9a2efb45ea89251aaab905360 (patch)
tree5d3527560565ed0a9d392368b14c581db5707c79 /fs/nfsd
parent1b7e0403c6a72d18bebd4f2a6858b6c69c4bd428 (diff)
nfsd: use STATEID_FMT and STATEID_VAL for printing stateids
Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c46
1 files changed, 16 insertions, 30 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 42dab9587afe..c8b621a120cd 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2416,11 +2416,8 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
2416 2416
2417 memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid)); 2417 memcpy(&open->op_delegate_stateid, &dp->dl_stateid, sizeof(dp->dl_stateid));
2418 2418
2419 dprintk("NFSD: delegation stateid=(%08x/%08x/%08x/%08x)\n\n", 2419 dprintk("NFSD: delegation stateid=" STATEID_FMT "\n",
2420 dp->dl_stateid.si_boot, 2420 STATEID_VAL(&dp->dl_stateid));
2421 dp->dl_stateid.si_stateownerid,
2422 dp->dl_stateid.si_fileid,
2423 dp->dl_stateid.si_generation);
2424out: 2421out:
2425 if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS 2422 if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS
2426 && flag == NFS4_OPEN_DELEGATE_NONE 2423 && flag == NFS4_OPEN_DELEGATE_NONE
@@ -2510,9 +2507,8 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
2510 2507
2511 status = nfs_ok; 2508 status = nfs_ok;
2512 2509
2513 dprintk("nfs4_process_open2: stateid=(%08x/%08x/%08x/%08x)\n", 2510 dprintk("%s: stateid=" STATEID_FMT "\n", __func__,
2514 stp->st_stateid.si_boot, stp->st_stateid.si_stateownerid, 2511 STATEID_VAL(&stp->st_stateid));
2515 stp->st_stateid.si_fileid, stp->st_stateid.si_generation);
2516out: 2512out:
2517 if (fp) 2513 if (fp)
2518 put_nfs4_file(fp); 2514 put_nfs4_file(fp);
@@ -2678,9 +2674,8 @@ STALE_STATEID(stateid_t *stateid)
2678{ 2674{
2679 if (time_after((unsigned long)boot_time, 2675 if (time_after((unsigned long)boot_time,
2680 (unsigned long)stateid->si_boot)) { 2676 (unsigned long)stateid->si_boot)) {
2681 dprintk("NFSD: stale stateid (%08x/%08x/%08x/%08x)!\n", 2677 dprintk("NFSD: stale stateid " STATEID_FMT "!\n",
2682 stateid->si_boot, stateid->si_stateownerid, 2678 STATEID_VAL(stateid));
2683 stateid->si_fileid, stateid->si_generation);
2684 return 1; 2679 return 1;
2685 } 2680 }
2686 return 0; 2681 return 0;
@@ -2692,9 +2687,8 @@ EXPIRED_STATEID(stateid_t *stateid)
2692 if (time_before((unsigned long)boot_time, 2687 if (time_before((unsigned long)boot_time,
2693 ((unsigned long)stateid->si_boot)) && 2688 ((unsigned long)stateid->si_boot)) &&
2694 time_before((unsigned long)(stateid->si_boot + lease_time), get_seconds())) { 2689 time_before((unsigned long)(stateid->si_boot + lease_time), get_seconds())) {
2695 dprintk("NFSD: expired stateid (%08x/%08x/%08x/%08x)!\n", 2690 dprintk("NFSD: expired stateid " STATEID_FMT "!\n",
2696 stateid->si_boot, stateid->si_stateownerid, 2691 STATEID_VAL(stateid));
2697 stateid->si_fileid, stateid->si_generation);
2698 return 1; 2692 return 1;
2699 } 2693 }
2700 return 0; 2694 return 0;
@@ -2708,9 +2702,8 @@ stateid_error_map(stateid_t *stateid)
2708 if (EXPIRED_STATEID(stateid)) 2702 if (EXPIRED_STATEID(stateid))
2709 return nfserr_expired; 2703 return nfserr_expired;
2710 2704
2711 dprintk("NFSD: bad stateid (%08x/%08x/%08x/%08x)!\n", 2705 dprintk("NFSD: bad stateid " STATEID_FMT "!\n",
2712 stateid->si_boot, stateid->si_stateownerid, 2706 STATEID_VAL(stateid));
2713 stateid->si_fileid, stateid->si_generation);
2714 return nfserr_bad_stateid; 2707 return nfserr_bad_stateid;
2715} 2708}
2716 2709
@@ -2896,10 +2889,8 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid,
2896 struct svc_fh *current_fh = &cstate->current_fh; 2889 struct svc_fh *current_fh = &cstate->current_fh;
2897 __be32 status; 2890 __be32 status;
2898 2891
2899 dprintk("NFSD: preprocess_seqid_op: seqid=%d " 2892 dprintk("NFSD: %s: seqid=%d stateid = " STATEID_FMT "\n", __func__,
2900 "stateid = (%08x/%08x/%08x/%08x)\n", seqid, 2893 seqid, STATEID_VAL(stateid));
2901 stateid->si_boot, stateid->si_stateownerid, stateid->si_fileid,
2902 stateid->si_generation);
2903 2894
2904 *stpp = NULL; 2895 *stpp = NULL;
2905 *sopp = NULL; 2896 *sopp = NULL;
@@ -3031,12 +3022,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
3031 sop->so_confirmed = 1; 3022 sop->so_confirmed = 1;
3032 update_stateid(&stp->st_stateid); 3023 update_stateid(&stp->st_stateid);
3033 memcpy(&oc->oc_resp_stateid, &stp->st_stateid, sizeof(stateid_t)); 3024 memcpy(&oc->oc_resp_stateid, &stp->st_stateid, sizeof(stateid_t));
3034 dprintk("NFSD: nfsd4_open_confirm: success, seqid=%d " 3025 dprintk("NFSD: %s: success, seqid=%d stateid=" STATEID_FMT "\n",
3035 "stateid=(%08x/%08x/%08x/%08x)\n", oc->oc_seqid, 3026 __func__, oc->oc_seqid, STATEID_VAL(&stp->st_stateid));
3036 stp->st_stateid.si_boot,
3037 stp->st_stateid.si_stateownerid,
3038 stp->st_stateid.si_fileid,
3039 stp->st_stateid.si_generation);
3040 3027
3041 nfsd4_create_clid_dir(sop->so_client); 3028 nfsd4_create_clid_dir(sop->so_client);
3042out: 3029out:
@@ -3295,9 +3282,8 @@ find_delegation_stateid(struct inode *ino, stateid_t *stid)
3295 struct nfs4_file *fp; 3282 struct nfs4_file *fp;
3296 struct nfs4_delegation *dl; 3283 struct nfs4_delegation *dl;
3297 3284
3298 dprintk("NFSD:find_delegation_stateid stateid=(%08x/%08x/%08x/%08x)\n", 3285 dprintk("NFSD: %s: stateid=" STATEID_FMT "\n", __func__,
3299 stid->si_boot, stid->si_stateownerid, 3286 STATEID_VAL(stid));
3300 stid->si_fileid, stid->si_generation);
3301 3287
3302 fp = find_file(ino); 3288 fp = find_file(ino);
3303 if (!fp) 3289 if (!fp)