#include <obd.h>
#include <lu_object.h>
#include <dt_object.h>
+#include <md_object.h>
#include <lustre_net.h>
#include <lustre_dlm.h>
#include <lustre_fid.h>
/* The server ever restarted during the LFSCK, and may miss to process
* some objects check/repair. */
LF_INCOMPLETE = 0x00000008ULL,
+
+ /* The LAST_ID (file) crashed. */
+ LF_CRASHED_LASTID = 0x00000010ULL,
};
struct lfsck_position {
int (*lfsck_double_scan)(const struct lu_env *env,
struct lfsck_component *com);
+
+ void (*lfsck_data_release)(const struct lu_env *env,
+ struct lfsck_component *com);
};
struct lfsck_component {
struct lfsck_operations *lc_ops;
void *lc_file_ram;
void *lc_file_disk;
+ void *lc_data;
/* The time for last checkpoint, jiffies */
cfs_time_t lc_time_last_checkpoint;
/* The time for next checkpoint, jiffies */
cfs_time_t li_time_next_checkpoint;
+ lfsck_out_notify li_out_notify;
+ void *li_out_notify_data;
struct dt_device *li_next;
struct dt_device *li_bottom;
struct ldlm_namespace *li_namespace;
/* old LMA for compatibility */
char lti_lma_old[LMA_OLD_SIZE];
};
+ struct dt_object_format lti_dof;
/* lti_ent and lti_key must be conjoint,
* then lti_ent::lde_name will be lti_key. */
struct lu_dirent lti_ent;
OBD_FREE(com->lc_file_ram, com->lc_file_size);
if (com->lc_file_disk != NULL)
OBD_FREE(com->lc_file_disk, com->lc_file_size);
+ if (com->lc_data != NULL) {
+ LASSERT(com->lc_ops->lfsck_data_release != NULL);
+
+ com->lc_ops->lfsck_data_release(env, com);
+ }
+
OBD_FREE_PTR(com);
}
}