Commit 849823c5 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd4: printk reduction

Demote some printk's that look like they could be triggered by non-buggy
clients to dprintk's.  (For example, stale clientid's are normal
occurrences on reboot, and on a server with a lot of clients these messages
could become annoying.)

Also remove some redundant dprintk's (e.g. no need for both STALE_CLIENTID
and its callers to do dprintks).
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fff71312
...@@ -624,7 +624,7 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se) ...@@ -624,7 +624,7 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se)
cb->cb_ident = se->se_callback_ident; cb->cb_ident = se->se_callback_ident;
return; return;
out_err: out_err:
printk(KERN_INFO "NFSD: this client (clientid %08x/%08x) " dprintk(KERN_INFO "NFSD: this client (clientid %08x/%08x) "
"will not receive delegations\n", "will not receive delegations\n",
clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id); clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id);
...@@ -2014,7 +2014,7 @@ STALE_STATEID(stateid_t *stateid) ...@@ -2014,7 +2014,7 @@ STALE_STATEID(stateid_t *stateid)
{ {
if (stateid->si_boot == boot_time) if (stateid->si_boot == boot_time)
return 0; return 0;
printk("NFSD: stale stateid (%08x/%08x/%08x/%08x)!\n", dprintk("NFSD: stale stateid (%08x/%08x/%08x/%08x)!\n",
stateid->si_boot, stateid->si_stateownerid, stateid->si_fileid, stateid->si_boot, stateid->si_stateownerid, stateid->si_fileid,
stateid->si_generation); stateid->si_generation);
return 1; return 1;
...@@ -2275,7 +2275,7 @@ nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *statei ...@@ -2275,7 +2275,7 @@ nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *statei
check_replay: check_replay:
if (seqid == sop->so_seqid - 1) { if (seqid == sop->so_seqid - 1) {
printk("NFSD: preprocess_seqid_op: retransmission?\n"); dprintk("NFSD: preprocess_seqid_op: retransmission?\n");
/* indicate replay to calling function */ /* indicate replay to calling function */
return NFSERR_REPLAY_ME; return NFSERR_REPLAY_ME;
} }
...@@ -2500,8 +2500,7 @@ find_stateid(stateid_t *stid, int flags) ...@@ -2500,8 +2500,7 @@ find_stateid(stateid_t *stid, int flags)
(local->st_stateid.si_fileid == f_id)) (local->st_stateid.si_fileid == f_id))
return local; return local;
} }
} else }
printk("NFSD: find_stateid: ERROR: no state flag\n");
return NULL; return NULL;
} }
...@@ -2705,10 +2704,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -2705,10 +2704,8 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
struct nfs4_file *fp; struct nfs4_file *fp;
status = nfserr_stale_clientid; status = nfserr_stale_clientid;
if (STALE_CLIENTID(&lock->lk_new_clientid)) { if (STALE_CLIENTID(&lock->lk_new_clientid))
printk("NFSD: nfsd4_lock: clientid is stale!\n");
goto out; goto out;
}
/* validate and update open stateid and open seqid */ /* validate and update open stateid and open seqid */
status = nfs4_preprocess_seqid_op(current_fh, status = nfs4_preprocess_seqid_op(current_fh,
...@@ -2751,7 +2748,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -2751,7 +2748,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
filp = lock_stp->st_vfs_file; filp = lock_stp->st_vfs_file;
if ((status = fh_verify(rqstp, current_fh, S_IFREG, MAY_LOCK))) { if ((status = fh_verify(rqstp, current_fh, S_IFREG, MAY_LOCK))) {
printk("NFSD: nfsd4_lock: permission denied!\n"); dprintk("NFSD: nfsd4_lock: permission denied!\n");
goto out; goto out;
} }
...@@ -2866,13 +2863,11 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -2866,13 +2863,11 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
nfs4_lock_state(); nfs4_lock_state();
status = nfserr_stale_clientid; status = nfserr_stale_clientid;
if (STALE_CLIENTID(&lockt->lt_clientid)) { if (STALE_CLIENTID(&lockt->lt_clientid))
printk("NFSD: nfsd4_lockt: clientid is stale!\n");
goto out; goto out;
}
if ((status = fh_verify(rqstp, current_fh, S_IFREG, 0))) { if ((status = fh_verify(rqstp, current_fh, S_IFREG, 0))) {
printk("NFSD: nfsd4_lockt: fh_verify() failed!\n"); dprintk("NFSD: nfsd4_lockt: fh_verify() failed!\n");
if (status == nfserr_symlink) if (status == nfserr_symlink)
status = nfserr_inval; status = nfserr_inval;
goto out; goto out;
...@@ -2976,7 +2971,7 @@ nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock ...@@ -2976,7 +2971,7 @@ nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private) if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private)
file_lock.fl_ops->fl_release_private(&file_lock); file_lock.fl_ops->fl_release_private(&file_lock);
if (status) { if (status) {
printk("NFSD: nfs4_locku: posix_lock_file failed!\n"); dprintk("NFSD: nfs4_locku: posix_lock_file failed!\n");
goto out_nfserr; goto out_nfserr;
} }
/* /*
...@@ -3036,10 +3031,8 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner * ...@@ -3036,10 +3031,8 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner *
/* XXX check for lease expiration */ /* XXX check for lease expiration */
status = nfserr_stale_clientid; status = nfserr_stale_clientid;
if (STALE_CLIENTID(clid)) { if (STALE_CLIENTID(clid))
printk("NFSD: nfsd4_release_lockowner: clientid is stale!\n");
return status; return status;
}
nfs4_lock_state(); nfs4_lock_state();
......
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