From: Lai Siyao Date: Sat, 29 Aug 2020 21:53:18 +0000 (+0800) Subject: LU-13922 osd-ldiskfs: no need to add OI cache in readdir X-Git-Tag: 2.12.6-RC1~29 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=bdef16d60713743e832fbb9d14ecb5cd116398c7;p=fs%2Flustre-release.git LU-13922 osd-ldiskfs: no need to add OI cache in readdir It's a waste of time to call osd_add_oi_cache() in osd_it_ea_rec(), because each dirent read will override it. Lustre-change: https://review.whamcloud.com/39782 Lustre-commit: bc5934632df10aaa02b32b8254a473c14c6f8104 Signed-off-by: Lai Siyao Change-Id: Iec701bf66153fdf2ba7a3f3b89565381215abf33 Reviewed-by: Andreas Dilger Reviewed-by: Stephane Thiell Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/40135 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 4c5793b..e496189 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -7239,8 +7239,6 @@ static inline int osd_it_ea_rec(const struct lu_env *env, rc = osd_ea_fid_get(env, obj, ino, fid, id); } - } else { - osd_id_gen(id, ino, OSD_OII_NOGEN); } } @@ -7250,15 +7248,6 @@ static inline int osd_it_ea_rec(const struct lu_env *env, it->oie_dirent->oied_namelen, it->oie_dirent->oied_type, attr); - if (rc < 0) - RETURN(rc); - - if (osd_remote_fid(env, dev, fid)) - RETURN(0); - - if (likely(!(attr & (LUDA_IGNORE | LUDA_UNKNOWN)) && rc == 0)) - osd_add_oi_cache(oti, dev, id, fid); - RETURN(rc > 0 ? 0 : rc); }