#include <lustre_ioctl.h>
#include <lustre_param.h>
#include <lustre_log.h>
-#include <lustre_mdc.h>
#include "osp_internal.h"
RETURN(dto);
/* Get attributes of the local object. */
- rc = dt_attr_get(env, dto, attr, NULL);
+ rc = dt_attr_get(env, dto, attr);
if (rc) {
CERROR("%s: can't be initialized: rc = %d\n",
osp->opd_obd->obd_name, rc);
rc = osp_disconnect(d);
- osp_sync_fini(d);
-
if (!d->opd_connect_mdt) {
+ /* stop sync thread */
+ osp_sync_fini(d);
+
/* stop precreate thread */
osp_precreate_fini(d);
unsigned long start = cfs_time_current();
ENTRY;
+ /* No Sync between MDTs yet. */
+ if (d->opd_connect_mdt)
+ RETURN(0);
+
if (unlikely(d->opd_imp_active == 0))
RETURN(-ENOTCONN);
rc = osp_init_precreate(osp);
if (rc)
GOTO(out_last_used, rc);
- }
- /*
- * Initialize synhronization mechanism taking
- * care of propogating changes to OST in near
- * transactional manner.
- */
- rc = osp_sync_init(env, osp);
- if (rc)
- GOTO(out_precreat, rc);
+ /*
+ * Initialize synhronization mechanism taking
+ * care of propogating changes to OST in near
+ * transactional manner.
+ */
+ rc = osp_sync_init(env, osp);
+ if (rc < 0)
+ GOTO(out_precreat, rc);
+ }
/*
* Initiate connect to OST
RETURN(0);
out:
- /* stop sync thread */
- osp_sync_fini(osp);
+ if (!osp->opd_connect_mdt)
+ /* stop sync thread */
+ osp_sync_fini(osp);
out_precreat:
/* stop precreate thread */
if (!osp->opd_connect_mdt)
return rc;
type = class_search_type(LUSTRE_OSP_NAME);
- type->typ_procsym = lprocfs_seq_register("osc", proc_lustre_root,
- NULL, NULL);
+ type->typ_procsym = lprocfs_register("osc", proc_lustre_root,
+ NULL, NULL);
if (IS_ERR(type->typ_procsym)) {
CERROR("osp: can't create compat entry \"osc\": %d\n",
(int) PTR_ERR(type->typ_procsym));