From: John L. Hammond Date: Wed, 17 Jun 2020 21:07:58 +0000 (-0500) Subject: LU-13690 mdd: remove warnings in obd_lookup() X-Git-Tag: 2.13.55~92 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F38971%2F2;p=fs%2Flustre-release.git 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 --- 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);