From d1015b8c4c315ff3d2b321e3565070f448b85fe6 Mon Sep 17 00:00:00 2001 From: niu Date: Thu, 4 Dec 2003 08:18:25 +0000 Subject: [PATCH] r: TianYing close all opened logs before user change logs via lctl, reopen them after lctl operation finished. --- lustre/mds/mds_lov.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index 077dccd..f4ad74c 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -463,7 +463,22 @@ int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len, } case OBD_IOC_LLOG_CANCEL: - case OBD_IOC_LLOG_REMOVE: + case OBD_IOC_LLOG_REMOVE: { + struct llog_ctxt *ctxt = + llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); + +#ifdef ENABLE_ORPHANS + obd_llog_finish(obd, mds->mds_lov_desc.ld_tgt_count); +#endif + push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_ctxt, NULL); + rc = llog_ioctl(ctxt, cmd, data); + pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_ctxt, NULL); + +#ifdef ENABLE_ORPHANS + llog_cat_initialize(obd, mds->mds_lov_desc.ld_tgt_count); +#endif + RETURN(rc); + } case OBD_IOC_LLOG_INFO: case OBD_IOC_LLOG_PRINT: { struct llog_ctxt *ctxt = -- 1.8.3.1