/*
* handling device state, mostly for tests
*/
- void (*dt_dev_sync)(const struct lu_context *ctx,
+ void (*dt_sync)(const struct lu_context *ctx,
struct dt_device *dev);
- void (*dt_dev_ro)(const struct lu_context *ctx,
+ void (*dt_ro)(const struct lu_context *ctx,
struct dt_device *dev, int sync);
};
#define DEBUG_SUBSYSTEM S_MDS
#include <linux/module.h>
-
#include <obd.h>
#include <obd_class.h>
#include <lustre_ver.h>
#include <obd_support.h>
#include <obd_lov.h>
#include <lprocfs_status.h>
-
-#include <lu_object.h>
-#include <md_object.h>
-#include <dt_object.h>
#include <lustre_mds.h>
#include <lustre_fid.h>
#include <lustre/lustre_idl.h>
lu_context_enter(&ctxt);
switch (cmd) {
case OBD_IOC_SYNC:
- dt->dd_ops->dt_dev_sync(&ctxt, dt);
+ dt->dd_ops->dt_sync(&ctxt, dt);
break;
case OBD_IOC_SET_READONLY:
- dt->dd_ops->dt_dev_ro(&ctxt, dt, 1);
+ dt->dd_ops->dt_ro(&ctxt, dt, 1);
break;
default:
CDEBUG(D_INFO, "Trying old MDS iocontrol %x\n", cmd);
if (OBD_FAIL_CHECK(id)) {
CERROR(LUSTRE_MDT0_NAME": obd_fail_loc=%x, fail write ops\n",
id);
- dd->dd_ops->dt_dev_ro(ctx, dd, 0);
+ dd->dd_ops->dt_ro(ctx, dd, 0);
/* We set FAIL_ONCE because we never "un-fail" a device */
obd_fail_loc |= OBD_FAILED | OBD_FAIL_ONCE;
}
rc = lu_object_exists(&o->mot_obj.mo_lu);
if (rc > 0) {
- struct mdt_device *mdt = info->mti_mdt;
rc = mo_attr_get(info->mti_ctxt, mdt_object_child(o), ma);
if (rc == 0)
rc = mdt_mfd_open(info, NULL, o, flags, 0, rep);
EXIT;
}
-static void osd_dev_sync(const struct lu_context *ctx,
+static void osd_sync(const struct lu_context *ctx,
struct dt_device *d)
{
struct osd_device *osd = osd_dt_dev(d);
- int rc = 0;
ENTRY;
CDEBUG(D_HA, "syncing OSD %s\n", LUSTRE_OSD0_NAME);
EXIT;
}
-static void osd_dev_ro(const struct lu_context *ctx,
+static void osd_ro(const struct lu_context *ctx,
struct dt_device *d, int sync)
{
struct thandle *th;
struct txn_param param = {
.tp_credits = 3
};
- int rc = 0;
ENTRY;
CERROR("*** setting device %s read-only ***\n", LUSTRE_OSD0_NAME);
osd_trans_stop(ctx, th);
if (sync)
- osd_dev_sync(ctx, d);
+ osd_sync(ctx, d);
lvfs_set_rdonly(lvfs_sbdev(osd_sb(osd_dt_dev(d))));
EXIT;
.dt_trans_start = osd_trans_start,
.dt_trans_stop = osd_trans_stop,
.dt_conf_get = osd_conf_get,
- .dt_dev_sync = osd_dev_sync,
- .dt_dev_ro = osd_dev_ro
+ .dt_sync = osd_sync,
+ .dt_ro = osd_ro
};
static void osd_object_read_lock(const struct lu_context *ctx,