#include <lustre/lustre_idl.h>
#include "ofd_internal.h"
#include <obd_cksum.h>
+#include <lustre_ioctl.h>
#include <lustre_quota.h>
#include <lustre_lfsck.h>
int ofd_obd_disconnect(struct obd_export *exp)
{
- struct ofd_device *ofd = ofd_dev(exp->exp_obd->obd_lu_dev);
+ struct ofd_device *ofd = ofd_exp(exp);
struct lu_env env;
int rc;
static int ofd_destroy_export(struct obd_export *exp)
{
- struct ofd_device *ofd = ofd_dev(exp->exp_obd->obd_lu_dev);
+ struct ofd_device *ofd = ofd_exp(exp);
if (exp->exp_filter_data.fed_pending)
CERROR("%s: cli %s/%p has %lu pending on destroyed export"
int ofd_postrecov(const struct lu_env *env, struct ofd_device *ofd)
{
struct lu_device *ldev = &ofd->ofd_dt_dev.dd_lu_dev;
+ struct lfsck_start_param lsp;
+ int rc;
+
+ CDEBUG(D_HA, "%s: recovery is over\n", ofd_name(ofd));
+
+ lsp.lsp_start = NULL;
+ lsp.lsp_index_valid = 0;
+ rc = lfsck_start(env, ofd->ofd_osd, &lsp);
+ if (rc != 0 && rc != -EALREADY)
+ CWARN("%s: auto trigger paused LFSCK failed: rc = %d\n",
+ ofd_name(ofd), rc);
- CDEBUG(D_HA, "%s: recovery is over\n", ofd_obd(ofd)->obd_name);
return ldev->ld_ops->ldo_recovery_complete(env, ldev);
}
struct obd_statfs *osfs, __u64 max_age, __u32 flags)
{
struct obd_device *obd = class_exp2obd(exp);
- struct ofd_device *ofd = ofd_dev(exp->exp_obd->obd_lu_dev);
+ struct ofd_device *ofd = ofd_exp(exp);
int rc;
ENTRY;
.o_reconnect = ofd_obd_reconnect,
.o_disconnect = ofd_obd_disconnect,
.o_create = ofd_echo_create,
+ .o_statfs = ofd_statfs,
.o_setattr = ofd_echo_setattr,
.o_preprw = ofd_preprw,
.o_commitrw = ofd_commitrw,