if (llapi_is_lustre_mnt(mnt)) {
/* search by pathname */
if (strncmp(mnt->mnt_dir, pathname,
- strlen(mnt->mnt_dir)) == 0) {
+ max(strlen(pathname),
+ strlen(mnt->mnt_dir))) == 0) {
ptr = strchr(mnt->mnt_fsname, '/');
if (ptr == NULL)
return -EINVAL;
if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
continue;
+ /* Don't traverse .lustre directory */
+ if (!(strcmp(dent->d_name, mdd_dot_lustre_name)))
+ continue;
+
path[len] = 0;
if ((len + dent->d_reclen + 2) > size) {
llapi_err(LLAPI_MSG_ERROR,
}
obd_matches:
- /* If file still fits the request, ask osd for updated info.
- The regulat stat is almost of the same speed as some new
+ /* If file still fits the request, ask ost for updated info.
+ The regular stat is almost of the same speed as some new
'glimpse-size-ioctl'. */
if (!decision && S_ISREG(st->st_mode) &&
(param->lmd->lmd_lmm.lmm_stripe_count || param->size)) {