Whamcloud - gitweb
small fixes: remove '_dev' from dt_sync and dt_ro methods, make compiler
authortappro <tappro>
Thu, 31 Aug 2006 22:04:36 +0000 (22:04 +0000)
committertappro <tappro>
Thu, 31 Aug 2006 22:04:36 +0000 (22:04 +0000)
happy

lustre/include/dt_object.h
lustre/mdd/mdd_lov.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_open.c
lustre/osd/osd_handler.c

index 7fe4462..5bd55dd 100644 (file)
@@ -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);
 
 };
index da99d7b..1b8e6cd 100644 (file)
 #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>
index 799ec9b..c4069a3 100644 (file)
@@ -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);
index 27f66eb..2bb6910 100644 (file)
@@ -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;
         }
index fd03cf2..13b5b25 100644 (file)
@@ -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);
index 51440a4..ff4ddd3 100644 (file)
@@ -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,