From 5eabb3dadcad5d86ff41417a9ae186b62b6c4d76 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Wed, 17 Jun 2020 16:07:58 -0500 Subject: [PATCH] LU-13690 mdd: remove warnings in obd_lookup() In obf_lookup() remove CWARN()s about invalid FID formats. Return -ENOENT instead of -EINVAL for invalid FIDs. This removes noisy console messages around volatile file handling in .lustre/fid/. Signed-off-by: John L. Hammond Change-Id: Ia76f0da38baa86b8d1173cfe0ede52e275f68a28 Reviewed-on: https://review.whamcloud.com/38971 Tested-by: jenkins Reviewed-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/mdd/mdd_device.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 9562c8e..a3f53e4 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -769,22 +769,12 @@ static int obf_lookup(const struct lu_env *env, struct md_object *p, name++; sscanf(name, SFID, RFID(f)); - if (!fid_is_sane(f)) { - 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_sane(f)) + GOTO(out, rc = -ENOENT); if (!fid_is_norm(f) && !fid_is_igif(f) && !fid_is_root(f) && - !fid_seq_is_dot(f->f_seq)) { - CWARN("%s: Trying to lookup invalid FID "DFID" in %s/%s, sequence should be >= %#llx or within [%#llx, %#llx].\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); - } + !fid_seq_is_dot(f->f_seq)) + GOTO(out, rc = -ENOENT); /* Check if object with this fid exists */ child = mdd_object_find(env, mdd, f); -- 1.8.3.1