Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
landing b_cmobd_merge on HEAD
[fs/lustre-release.git]
/
lustre
/
mds
/
mds_lov.c
diff --git
a/lustre/mds/mds_lov.c
b/lustre/mds/mds_lov.c
index
4dd05a3
..
e4ab36d
100644
(file)
--- a/
lustre/mds/mds_lov.c
+++ b/
lustre/mds/mds_lov.c
@@
-181,6
+181,7
@@
int mds_lov_connect(struct obd_device *obd, char * lov_name)
{
struct mds_obd *mds = &obd->u.mds;
struct lustre_handle conn = {0,};
+ char name[32] = "CATLIST";
int valsize, rc, i;
__u32 group;
ENTRY;
@@
-233,8
+234,8
@@
int mds_lov_connect(struct obd_device *obd, char * lov_name)
GOTO(err_reg, rc);
}
- rc =
llog_cat_initialize(obd, &obd->obd_llogs,
-
mds->mds_lov_desc.ld_tgt_count
);
+ rc =
obd_llog_cat_initialize(obd, &obd->obd_llogs,
+
mds->mds_lov_desc.ld_tgt_count, name
);
if (rc) {
CERROR("failed to initialize catalog %d\n", rc);
GOTO(err_reg, rc);
@@
-339,8
+340,7
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
struct obd_device *obd = exp->exp_obd;
struct mds_obd *mds = &obd->u.mds;
struct obd_ioctl_data *data = karg;
- struct obd_run_ctxt saved;
- struct llog_ctxt *ctxt;
+ struct lvfs_run_ctxt saved;
int rc = 0;
switch (cmd) {
@@
-349,15
+349,16
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
if (mds->mds_cfg_llh)
RETURN(-EBUSY);
- push_ctxt(&saved, &obd->obd_ctxt, NULL);
- ctxt = llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
- rc = llog_create(ctxt, &mds->mds_cfg_llh, NULL, name);
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_create(llog_get_context(&obd->obd_llogs,
+ LLOG_CONFIG_ORIG_CTXT),
+ &mds->mds_cfg_llh, NULL, name);
if (rc == 0)
llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN,
&cfg_uuid);
else
mds->mds_cfg_llh = NULL;
- pop_ctxt(&saved, &obd->obd_ctxt, NULL);
+ pop_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
RETURN(rc);
}
@@
-366,9
+367,9
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
if (!mds->mds_cfg_llh)
RETURN(-EBADF);
- push_ctxt(&saved, &obd->obd_ctxt, NULL);
+ push_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
rc = llog_close(mds->mds_cfg_llh);
- pop_ctxt(&saved, &obd->obd_ctxt, NULL);
+ pop_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
mds->mds_cfg_llh = NULL;
RETURN(rc);
@@
-379,18
+380,19
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
if (mds->mds_cfg_llh)
RETURN(-EBUSY);
- push_ctxt(&saved, &obd->obd_ctxt, NULL);
- ctxt = llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
- rc = llog_create(ctxt, &mds->mds_cfg_llh, NULL, name);
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_create(llog_get_context(&obd->obd_llogs,
+ LLOG_CONFIG_ORIG_CTXT),
+ &mds->mds_cfg_llh, NULL, name);
if (rc == 0) {
llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN,
NULL);
-
+
rc = llog_destroy(mds->mds_cfg_llh);
llog_free_handle(mds->mds_cfg_llh);
}
- pop_ctxt(&saved, &obd->obd_ctxt, NULL);
-
+ pop_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
+
mds->mds_cfg_llh = NULL;
RETURN(rc);
}
@@
-421,10
+423,10
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
RETURN(rc);
}
- push_ctxt(&saved, &obd->obd_ctxt, NULL);
+ push_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
rc = llog_write_rec(mds->mds_cfg_llh, &rec, NULL, 0,
cfg_buf, -1);
- pop_ctxt(&saved, &obd->obd_ctxt, NULL);
+ pop_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
OBD_FREE(cfg_buf, data->ioc_plen1);
RETURN(rc);
@@
-433,9
+435,9
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
case OBD_IOC_PARSE: {
struct llog_ctxt *ctxt =
llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
- push_ctxt(&saved, &obd->obd_ctxt, NULL);
+ push_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
- pop_ctxt(&saved, &obd->obd_ctxt, NULL);
+ pop_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
if (rc)
RETURN(rc);
@@
-445,9
+447,9
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
case OBD_IOC_DUMP_LOG: {
struct llog_ctxt *ctxt =
llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
- push_ctxt(&saved, &obd->obd_ctxt, NULL);
+ push_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
- pop_ctxt(&saved, &obd->obd_ctxt, NULL);
+ pop_ctxt(&saved, &obd->obd_
lvfs_
ctxt, NULL);
if (rc)
RETURN(rc);
@@
-471,7
+473,7
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
case OBD_IOC_CATLOGLIST: {
int count = mds->mds_lov_desc.ld_tgt_count;
- rc = llog_catlog_list(obd, count, data);
+ rc = llog_cat
a
log_list(obd, count, data);
RETURN(rc);
}
@@
-480,17
+482,19
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
case OBD_IOC_LLOG_REMOVE: {
struct llog_ctxt *ctxt =
llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
+ char name[32] = "CATLIST";
int rc2;
obd_llog_finish(obd, &obd->obd_llogs,
mds->mds_lov_desc.ld_tgt_count);
- push_ctxt(&saved,
&ctxt->loc_exp->exp_obd->obd
_ctxt, NULL);
+ push_ctxt(&saved,
ctxt->loc_lvfs
_ctxt, NULL);
rc = llog_ioctl(ctxt, cmd, data);
- pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_ctxt, NULL);
- llog_cat_initialize(obd, &obd->obd_llogs,
- mds->mds_lov_desc.ld_tgt_count);
- rc2 = obd_set_info(mds->mds_osc_exp, strlen("mds_conn"), "mds_conn",
- 0, NULL);
+ pop_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
+ obd_llog_cat_initialize(obd, &obd->obd_llogs,
+ mds->mds_lov_desc.ld_tgt_count,
+ name);
+ rc2 = obd_set_info(mds->mds_osc_exp, strlen("mds_conn"),
+ "mds_conn", 0, NULL);
if (!rc)
rc = rc2;
RETURN(rc);
@@
-500,9
+504,9
@@
int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
struct llog_ctxt *ctxt =
llog_get_context(&obd->obd_llogs, LLOG_CONFIG_ORIG_CTXT);
- push_ctxt(&saved,
&ctxt->loc_exp->exp_obd->obd
_ctxt, NULL);
+ push_ctxt(&saved,
ctxt->loc_lvfs
_ctxt, NULL);
rc = llog_ioctl(ctxt, cmd, data);
- pop_ctxt(&saved,
&ctxt->loc_exp->exp_obd->obd
_ctxt, NULL);
+ pop_ctxt(&saved,
ctxt->loc_lvfs
_ctxt, NULL);
RETURN(rc);
}
@@
-543,8
+547,8
@@
int mds_notify(struct obd_device *obd, struct obd_device *watched, int active)
ctxt = llog_get_context(&obd->obd_llogs, LLOG_UNLINK_ORIG_CTXT);
LASSERT(ctxt != NULL);
- rc = obd_set_info(obd->u.mds.mds_osc_exp, strlen("mds_conn"),
"mds_conn",
- 0, uuid);
+ rc = obd_set_info(obd->u.mds.mds_osc_exp, strlen("mds_conn"),
+
"mds_conn",
0, uuid);
if (rc != 0)
RETURN(rc);