Whamcloud - gitweb
LU-13922 osd-ldiskfs: no need to add OI cache in readdir 82/39782/3
authorLai Siyao <lai.siyao@whamcloud.com>
Sat, 29 Aug 2020 21:53:18 +0000 (05:53 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 20 Sep 2020 04:27:11 +0000 (04:27 +0000)
It's a waste of time to call osd_add_oi_cache() in osd_it_ea_rec(),
because each dirent read will override it.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Iec701bf66153fdf2ba7a3f3b89565381215abf33
Reviewed-on: https://review.whamcloud.com/39782
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c

index 3696908..57ef148 100644 (file)
@@ -7277,8 +7277,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);
                }
        }
 
@@ -7288,15 +7286,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);
 }