From 845697e0c89e0758ee222e2fcc2e11bac6a8789c Mon Sep 17 00:00:00 2001 From: tappro Date: Thu, 31 Aug 2006 22:04:36 +0000 Subject: [PATCH] small fixes: remove '_dev' from dt_sync and dt_ro methods, make compiler happy --- lustre/include/dt_object.h | 4 ++-- lustre/mdd/mdd_lov.c | 5 ----- lustre/mdt/mdt_handler.c | 4 ++-- lustre/mdt/mdt_internal.h | 2 +- lustre/mdt/mdt_open.c | 1 - lustre/osd/osd_handler.c | 12 +++++------- 6 files changed, 10 insertions(+), 18 deletions(-) diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 7fe4462..5bd55dd 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -93,9 +93,9 @@ struct dt_device_operations { /* * 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); }; diff --git a/lustre/mdd/mdd_lov.c b/lustre/mdd/mdd_lov.c index da99d7b..1b8e6cd 100644 --- a/lustre/mdd/mdd_lov.c +++ b/lustre/mdd/mdd_lov.c @@ -32,17 +32,12 @@ #define DEBUG_SUBSYSTEM S_MDS #include - #include #include #include #include #include #include - -#include -#include -#include #include #include #include diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 799ec9b..c4069a3 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -2735,10 +2735,10 @@ static int mdt_iocontrol(unsigned int cmd, struct obd_export *exp, int len, 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); diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index 27f66eb..2bb6910 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -414,7 +414,7 @@ static inline void mdt_fail_write(const struct lu_context *ctx, 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; } diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index fd03cf2..13b5b25 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -572,7 +572,6 @@ int mdt_cross_open(struct mdt_thread_info* info, const struct lu_fid *fid, 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); diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 51440a4..ff4ddd3 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -564,11 +564,10 @@ static void osd_trans_stop(const struct lu_context *ctx, struct thandle *th) 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); @@ -576,14 +575,13 @@ static void osd_dev_sync(const struct lu_context *ctx, 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); @@ -593,7 +591,7 @@ static void osd_dev_ro(const struct lu_context *ctx, 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; @@ -606,8 +604,8 @@ static struct dt_device_operations osd_dt_ops = { .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, -- 1.8.3.1