#include <sys/stat.h>
#include <sys/queue.h>
+#include <sysio.h>
#ifdef HAVE_XTIO_H
#include <xtio.h>
#endif
-#include <sysio.h>
#include <fs.h>
#include <mount.h>
#include <inode.h>
* of 'LIST_HEAD'. undef it to suppress warnings
*/
#undef LIST_HEAD
+#include <liblustre.h>
#include <lnet/lnetctl.h> /* needed for parse_dump */
#include "lutil.h"
init_obdclass() ||
ptlrpc_init() ||
mgc_init() ||
+ lmv_init() ||
mdc_init() ||
lov_init() ||
osc_init())
struct obd_connect_data *ocd = NULL;
ENTRY;
- generate_random_uuid(uuid);
+ ll_generate_random_uuid(uuid);
class_uuid_unparse(uuid, &mgc_uuid);
nid = libcfs_str2nid(mgsnid);
if (ocd == NULL)
GOTO(out_cleanup, rc = -ENOMEM);
- ocd->ocd_connect_flags = OBD_CONNECT_VERSION;
+ ocd->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_FID;
+#ifdef LIBLUSTRE_POSIX_ACL
+ ocd->ocd_connect_flags |= OBD_CONNECT_ACL;
+#endif
ocd->ocd_version = LUSTRE_VERSION_CODE;
- rc = obd_connect(&mgc_conn, obd, &mgc_uuid, ocd);
+ rc = obd_connect(NULL, &mgc_conn, obd, &mgc_uuid, ocd, NULL);
if (rc) {
CERROR("cannot connect to %s at %s: rc = %d\n",
LUSTRE_MGS_OBDNAME, mgsnid, rc);
exp = class_conn2export(&mgc_conn);
- ctxt = exp->exp_obd->obd_llog_ctxt[LLOG_CONFIG_REPL_CTXT];
+ ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
cfg->cfg_flags |= CFG_F_COMPAT146;
rc = class_config_parse_llog(ctxt, profile, cfg);
+ llog_ctxt_put(ctxt);
if (rc) {
CERROR("class_config_parse_llog failed: rc = %d\n", rc);
}
err = class_process_config(lcfg);
lustre_cfg_free(lcfg);
if (err)
- CERROR("mdc_cleanup failed: rc = %d\n", err);
+ CERROR("md_cleanup failed: rc = %d\n", err);
out_detach:
lustre_cfg_bufs_reset(&bufs, name);
err = class_process_config(lcfg);
lustre_cfg_free(lcfg);
if (err)
- CERROR("mdc_detach failed: rc = %d\n", err);
+ CERROR("md_detach failed: rc = %d\n", err);
out_del_uuid:
lustre_cfg_bufs_reset(&bufs, name);