fid_oid(fid) == 1));
}
+static inline int fid_seq_is_dot_lustre(__u64 seq)
+{
+ return unlikely(seq == FID_SEQ_DOT_LUSTRE);
+}
+
static inline int fid_is_dot_lustre(const struct lu_fid *fid)
{
return unlikely(fid_seq(fid) == FID_SEQ_DOT_LUSTRE &&
* object or not. It is caller's duty to check more if needed. */
return (!fid_is_last_id(fid) &&
(fid_seq_is_norm(seq) || fid_seq_is_igif(seq))) ||
- fid_is_root(fid) || fid_is_dot_lustre(fid);
+ fid_is_root(fid) || fid_seq_is_dot_lustre(seq);
}
static inline int fid_seq_in_fldb(__u64 seq)
return 1;
}
- /* .lustre doesn't contain "real" user objects, no need lfsck */
- if (fid_is_dot_lustre(lfsck_dto2fid(obj))) {
+ /* No need to check .lustre and its children. */
+ if (fid_seq_is_dot_lustre(fid_seq(lfsck_dto2fid(obj)))) {
if (depth > 0)
lfsck_object_put(env, obj);
return 0;
return 0;
}
- /* Currently, only client visible directory can be remote. */
if (dt_object_remote(obj)) {
+ /* .lustre/lost+found/MDTxxx can be remote directory. */
+ if (fid_seq_is_dot_lustre(fid_seq(lfsck_dto2fid(obj))))
+ rc = 0;
+ else
+ /* Other remote directory should be client
+ * visible and need to be checked. */
+ rc = 1;
lfsck_object_put(env, obj);
- return 1;
+ return rc;
}
depth++;
if (ent->lde_name[0] == '.' &&
(ent->lde_namelen == 1 ||
(ent->lde_namelen == 2 && ent->lde_name[1] == '.') ||
- fid_is_dot_lustre(&ent->lde_fid)))
+ fid_seq_is_dot_lustre(fid_seq(&ent->lde_fid))))
GOTO(out, rc = 0);
if (!(bk->lb_param & LPF_DRYRUN) &&