In mdd_dir_page_build() skip dirents with the FID of .lustre
preventing that directory from being return by readdir on Lustre
clients. Add a sanity tets to this effect.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ieecb77a286748c4bf4df4dee68d7f33670a0c286
Reviewed-on: http://review.whamcloud.com/11186
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
__u64 hash = 0;
struct lu_dirent *ent;
struct lu_dirent *last = NULL;
+ struct lu_fid fid;
int first = 1;
memset(area, 0, sizeof (*dp));
/* osd might not able to pack all attributes,
* so recheck rec length */
recsize = le16_to_cpu(ent->lde_reclen);
+
+ if (le32_to_cpu(ent->lde_attrs) & LUDA_FID) {
+ fid_le_to_cpu(&fid, &ent->lde_fid);
+ if (fid_is_dot_lustre(&fid))
+ goto next;
+ }
} else {
result = (last != NULL) ? 0 :-EINVAL;
goto out;
}
run_test 154d "Verify open file fid"
+test_154e()
+{
+ [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.50) ]] &&
+ skip "Need MDS version at least 2.6.50" && return
+
+ if ls -a $MOUNT | grep -q '^\.lustre$'; then
+ error ".lustre returned by readdir"
+ fi
+}
+run_test 154e ".lustre is not returned by readdir"
+
test_155_small_load() {
local temp=$TMP/$tfile
local file=$DIR/$tfile