From 58f54a3e5a29f5cbb1b2b6a2cc80186f3c8b9c8a Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Wed, 12 Mar 2014 02:06:04 -0400 Subject: [PATCH] LU-4742 mdd: improve error messages in obf_lookup() To make user able to understand that's just an invalid operation in .lustre/fid, but not a serious error. Signed-off-by: Niu Yawei Change-Id: I928cdf61ae6a70c0ff5bbe1133338c54cd997aa2 Reviewed-on: http://review.whamcloud.com/9594 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/mdd/mdd_device.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index dce2249..fe9de80 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -558,19 +558,20 @@ static int obf_lookup(const struct lu_env *env, struct md_object *p, sscanf(name, SFID, RFID(f)); if (!fid_is_sane(f)) { - CWARN("%s: bad FID format [%s], should be "DFID"\n", - mdd2obd_dev(mdd)->obd_name, lname->ln_name, + CWARN("%s: Trying to lookup invalid FID [%s] in %s/%s, FID " + "format should be "DFID"\n", mdd2obd_dev(mdd)->obd_name, + lname->ln_name, dot_lustre_name, mdd_obf_dir_name, (__u64)FID_SEQ_NORMAL, 1, 0); GOTO(out, rc = -EINVAL); } if (!fid_is_norm(f) && !fid_is_igif(f) && !fid_is_root(f) && !fid_seq_is_dot(f->f_seq)) { - CWARN("%s: "DFID" is invalid, sequence should be " - ">= "LPX64" or within ["LPX64","LPX64"].\n", - mdd2obd_dev(mdd)->obd_name, PFID(f), - (__u64)FID_SEQ_NORMAL, (__u64)FID_SEQ_IGIF, - (__u64)FID_SEQ_IGIF_MAX); + CWARN("%s: Trying to lookup invalid FID "DFID" in %s/%s, " + "sequence should be >= "LPX64" or within ["LPX64"," + ""LPX64"].\n", mdd2obd_dev(mdd)->obd_name, PFID(f), + dot_lustre_name, mdd_obf_dir_name, (__u64)FID_SEQ_NORMAL, + (__u64)FID_SEQ_IGIF, (__u64)FID_SEQ_IGIF_MAX); GOTO(out, rc = -EINVAL); } -- 1.8.3.1