From eff9227f207c667042f515981f87b4e2f5d615f9 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 23 Jan 2014 22:07:55 -0700 Subject: [PATCH] LU-4522 llite: quiet console permission error messages Quiet some common console error messages for permission errors that can be hit in common cases. Signed-off-by: Andreas Dilger Change-Id: I8ef2eec8c466e41bdaf08779440a186e442540e5 Reviewed-on: http://review.whamcloud.com/8988 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: Faccini Bruno Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/llite/file.c | 7 ++++--- lustre/mdc/mdc_locks.c | 27 +++++++++++++++------------ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index f81a8ac..9018eb6 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -3190,9 +3190,10 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc) if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) return 0; } else if (rc != 0) { - CERROR("%s: revalidate FID "DFID" error: rc = %d\n", - ll_get_fsname(inode->i_sb, NULL, 0), - PFID(ll_inode2fid(inode)), rc); + CDEBUG_LIMIT((rc == -EACCES || rc == -EIDRM) ? D_INFO : D_ERROR, + "%s: revalidate FID "DFID" error: rc = %d\n", + ll_get_fsname(inode->i_sb, NULL, 0), + PFID(ll_inode2fid(inode)), rc); } return rc; diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 24eaee9..23694fd 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -892,21 +892,24 @@ resend: (einfo->ei_type == LDLM_FLOCK) && (einfo->ei_mode == LCK_NL)) goto resend; - RETURN(rc); - } + RETURN(rc); + } - mdc_exit_request(&obddev->u.cli); - mdc_put_rpc_lock(obddev->u.cli.cl_rpc_lock, it); + mdc_exit_request(&obddev->u.cli); + mdc_put_rpc_lock(obddev->u.cli.cl_rpc_lock, it); - if (rc < 0) { - CERROR("ldlm_cli_enqueue: %d\n", rc); - mdc_clear_replay_flag(req, rc); - ptlrpc_req_finished(req); - RETURN(rc); - } + if (rc < 0) { + CDEBUG_LIMIT((rc == -EACCES || rc == -EIDRM) ? D_INFO : D_ERROR, + "%s: ldlm_cli_enqueue failed: rc = %d\n", + obddev->obd_name, rc); + + mdc_clear_replay_flag(req, rc); + ptlrpc_req_finished(req); + RETURN(rc); + } - lockrep = req_capsule_server_get(&req->rq_pill, &RMF_DLM_REP); - LASSERT(lockrep != NULL); + lockrep = req_capsule_server_get(&req->rq_pill, &RMF_DLM_REP); + LASSERT(lockrep != NULL); lockrep->lock_policy_res2 = ptlrpc_status_ntoh(lockrep->lock_policy_res2); -- 1.8.3.1