@@ -35,6 +35,7 @@
#include <obd_class.h>
#include <lustre_osc.h>
+#include <uapi/linux/lustre/lustre_param.h>
#include "mdc_internal.h"
@@ -1422,15 +1423,17 @@ struct lu_object *mdc_object_alloc(const struct lu_env *env,
return obj;
}
-static int mdc_cl_process_config(const struct lu_env *env,
- struct lu_device *d, struct lustre_cfg *cfg)
+static int mdc_process_config(const struct lu_env *env, struct lu_device *d,
+ struct lustre_cfg *cfg)
{
- return mdc_process_config(d->ld_obd, 0, cfg);
+ size_t count = class_modify_config(cfg, PARAM_MDC,
+ &d->ld_obd->obd_kset.kobj);
+ return count > 0 ? 0 : count;
}
const struct lu_device_operations mdc_lu_ops = {
.ldo_object_alloc = mdc_object_alloc,
- .ldo_process_config = mdc_cl_process_config,
+ .ldo_process_config = mdc_process_config,
.ldo_recovery_complete = NULL,
};
@@ -93,7 +93,6 @@ int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid,
int mdc_fid_alloc(const struct lu_env *env, struct obd_export *exp,
struct lu_fid *fid, struct md_op_data *op_data);
int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg);
-int mdc_process_config(struct obd_device *obd, u32 len, void *buf);
struct obd_client_handle;
@@ -51,7 +51,6 @@
#include <lustre_kernelcomm.h>
#include <lustre_lmv.h>
#include <lustre_log.h>
-#include <uapi/linux/lustre/lustre_param.h>
#include <lustre_swab.h>
#include <obd_class.h>
#include <lustre_osc.h>
@@ -2743,15 +2742,6 @@ static int mdc_cleanup(struct obd_device *obd)
return osc_cleanup_common(obd);
}
-int mdc_process_config(struct obd_device *obd, u32 len, void *buf)
-{
- struct lustre_cfg *lcfg = buf;
- size_t count = class_modify_config(lcfg, PARAM_MDC,
- &obd->obd_kset.kobj);
-
- return count > 0 ? 0 : count;
-}
-
static const struct obd_ops mdc_obd_ops = {
.owner = THIS_MODULE,
.setup = mdc_setup,
@@ -2770,7 +2760,6 @@ int mdc_process_config(struct obd_device *obd, u32 len, void *buf)
.fid_alloc = mdc_fid_alloc,
.import_event = mdc_import_event,
.get_info = mdc_get_info,
- .process_config = mdc_process_config,
.get_uuid = mdc_get_uuid,
.quotactl = mdc_quotactl,
};
@@ -40,6 +40,7 @@
/* class_name2obd() */
#include <obd_class.h>
#include <lustre_osc.h>
+#include <uapi/linux/lustre/lustre_param.h>
#include "osc_internal.h"
@@ -161,15 +162,17 @@ struct lu_context_key osc_session_key = {
/* type constructor/destructor: osc_type_{init,fini,start,stop}(). */
LU_TYPE_INIT_FINI(osc, &osc_key, &osc_session_key);
-static int osc_cl_process_config(const struct lu_env *env,
- struct lu_device *d, struct lustre_cfg *cfg)
+static int osc_process_config(const struct lu_env *env, struct lu_device *d,
+ struct lustre_cfg *cfg)
{
- return osc_process_config_base(d->ld_obd, cfg);
+ ssize_t count = class_modify_config(cfg, PARAM_OSC,
+ &d->ld_obd->obd_kset.kobj);
+ return count > 0 ? 0 : count;
}
static const struct lu_device_operations osc_lu_ops = {
.ldo_object_alloc = osc_object_alloc,
- .ldo_process_config = osc_cl_process_config,
+ .ldo_process_config = osc_process_config,
.ldo_recovery_complete = NULL
};
@@ -47,7 +47,6 @@
#include <lprocfs_status.h>
#include <uapi/linux/lustre/lustre_ioctl.h>
#include <lustre_obdo.h>
-#include <uapi/linux/lustre/lustre_param.h>
#include <lustre_fid.h>
#include <obd_class.h>
#include <obd.h>
@@ -3348,18 +3347,6 @@ int osc_cleanup_common(struct obd_device *obd)
}
EXPORT_SYMBOL(osc_cleanup_common);
-int osc_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg)
-{
- ssize_t count = class_modify_config(lcfg, PARAM_OSC,
- &obd->obd_kset.kobj);
- return count > 0 ? 0 : count;
-}
-
-static int osc_process_config(struct obd_device *obd, u32 len, void *buf)
-{
- return osc_process_config_base(obd, buf);
-}
-
static const struct obd_ops osc_obd_ops = {
.owner = THIS_MODULE,
.setup = osc_setup,
@@ -3379,7 +3366,6 @@ static int osc_process_config(struct obd_device *obd, u32 len, void *buf)
.iocontrol = osc_iocontrol,
.set_info_async = osc_set_info_async,
.import_event = osc_import_event,
- .process_config = osc_process_config,
.quotactl = osc_quotactl,
};