enum lfsck_namespace_trace_flags {
LNTF_CHECK_LINKEA = 0x01,
LNTF_CHECK_PARENT = 0x02,
+ LNTF_SKIP_NLINK = 0x04,
+ LNTF_CHECK_ORPHAN = 0x08,
LNTF_ALL = 0xff
};
/* How many objects with nlink fixed. */
__u64 ln_objs_nlink_repaired;
- /* How many objects were lost before, but found back now. */
- __u64 ln_objs_lost_found;
-
/* The latest object has been processed (failed) during double scan. */
struct lu_fid ln_fid_latest_scanned_phase2;
/* How many name entries with bad file type have been repaired. */
__u64 ln_bad_type_repaired;
+ /* How many lost name entries have been re-inserted. */
+ __u64 ln_lost_dirent_repaired;
+
+ /* How many objects under /lost+found have been scanned. */
+ __u64 ln_local_lpf_scanned;
+
+ /* How many objects under /lost+found have been moved to
+ * namespace visible directory. */
+ __u64 ln_local_lpf_moved;
+
+ /* How many objects under /lost+found have been skipped. */
+ __u64 ln_local_lpf_skipped;
+
+ /* How many objects under /lost+found failed to be processed. */
+ __u64 ln_local_lpf_failed;
+
+ /* The size of MDT targets bitmap with nbits. Such bitmap records
+ * the MDTs that contain non-verified MDT-objects. */
+ __u32 ln_bitmap_size;
+
+ __u32 ln_reserved_1;
/* For further using. 256-bytes aligned now. */
- __u64 ln_reserved[26];
+ __u64 ln_reserved[25];
};
enum lfsck_layout_inconsistency_type {
int (*lfsck_in_notify)(const struct lu_env *env,
struct lfsck_component *com,
- struct lfsck_request *lr);
+ struct lfsck_request *lr,
+ struct thandle *th);
int (*lfsck_query)(const struct lu_env *env,
struct lfsck_component *com);
__u32 ltd_namespace_gen;
unsigned int ltd_dead:1,
ltd_layout_done:1,
- ltd_namespace_done:1;
+ ltd_namespace_done:1,
+ ltd_namespace_failed:1;
};
struct lfsck_tgt_desc_idx {
struct lfsck_thread_info {
struct lu_name lti_name_const;
struct lu_name lti_name;
+ struct lu_name lti_name2;
struct lu_buf lti_buf;
struct lu_buf lti_linkea_buf;
struct lu_buf lti_linkea_buf2;
struct lfsck_component *com);
/* lfsck_engine.c */
+int lfsck_unpack_ent(struct lu_dirent *ent, __u64 *cookie, __u16 *type);
int lfsck_master_engine(void *args);
int lfsck_assistant_engine(void *args);
LASSERT(com->lc_lfsck->li_master);
LASSERT(bitmap != NULL);
- LASSERTF(bitmap->size > index, "invalid index: nbits %d, index %u\n",
- bitmap->size, index);
- cfs_bitmap_set(bitmap, index);
- lad->lad_incomplete = 1;
+ if (likely(bitmap->size > index)) {
+ cfs_bitmap_set(bitmap, index);
+ lad->lad_incomplete = 1;
+ } else if (com->lc_type == LFSCK_TYPE_NAMESPACE) {
+ struct lfsck_namespace *ns = com->lc_file_ram;
+
+ ns->ln_flags |= LF_INCOMPLETE;
+ }
}
static inline int lfsck_links_read(const struct lu_env *env,