* 1cf6
* lcfG
*/
-#define LUSTRE_CFG_VERSION 0x1cf60001
+#define LUSTRE_CFG_MAGIC 0x1cf60001
+#define LUSTRE_CFG_START_VERSION 0x10000001
#define LUSTRE_CFG_MAX_BUFCOUNT 8
#define LCFG_HDR_SIZE(count) \
};
struct lustre_cfg {
+ uint32_t lcfg_magic;
uint32_t lcfg_version;
uint32_t lcfg_command;
if (!lcfg)
RETURN(lcfg);
- lcfg->lcfg_version = LUSTRE_CFG_VERSION;
+ lcfg->lcfg_magic = LUSTRE_CFG_MAGIC;
+ lcfg->lcfg_version = LUSTRE_CFG_START_VERSION;
lcfg->lcfg_command = cmd;
lcfg->lcfg_bufcount = bufs->lcfg_bufcount;
if (len < LCFG_HDR_SIZE(0))
RETURN(-EINVAL);
- if (lcfg->lcfg_version != LUSTRE_CFG_VERSION)
+ if (lcfg->lcfg_magic != LUSTRE_CFG_MAGIC)
RETURN(-EINVAL);
if (lcfg->lcfg_bufcount >= LUSTRE_CFG_MAX_BUFCOUNT)
RETURN(-EINVAL);
struct lustre_disk_data {
__u32 ldd_magic;
- __u32 ldd_flags; /* LDD_SV_TYPE */
- struct host_desc ldd_mgmtnid; /* mgmt nid; lmd can override */
- char ldd_fsname[64]; /* filesystem this server is part of */
- char ldd_svname[64]; /* this server's name (lustre-mdt0001) */
- enum ldd_mount_type ldd_mount_type; /* target fs type LDD_MT_* */
- char ldd_mount_opts[128]; /* target fs mount opts */
+ __u32 ldd_flags; /* LDD_SV_TYPE */
+ char ldd_fsname[64]; /* filesystem this server is part of */
+ char ldd_svname[64]; /* this server's name (lustre-mdt0001) */
+ char ldd_mount_opts[128]; /* target fs mount opts */
+ struct host_desc ldd_mgmtnid; /* mgmt nid; lmd can override */
+ enum ldd_mount_type ldd_mount_type; /* target fs type LDD_MT_* */
};
#define IS_MDT(data) ((data)->ldd_flags & LDD_F_SV_TYPE_MDT)
int (*lop_connect)(struct llog_ctxt *ctxt, int count,
struct llog_logid *logid, struct llog_gen *gen,
struct obd_uuid *uuid);
+ int (*lop_update)(struct llog_ctxt *ctxt, struct llog_handle **,
+ struct llog_logid *logid, void *data);
/* XXX add 2 more: commit callbacks and llog recovery functions */
};
}
static inline int llog_create(struct llog_ctxt *ctxt, struct llog_handle **res,
- struct llog_logid *logid, char *name)
+ struct llog_logid *logid, char*fsname, char *name)
{
struct llog_operations *lop;
int rc;
if (lop->lop_create == NULL)
RETURN(-EOPNOTSUPP);
- rc = lop->lop_create(ctxt, res, logid, NULL/*fsname*/, name);
+ rc = lop->lop_create(ctxt, res, logid, fsname, name);
RETURN(rc);
}
struct lvfs_callback_ops {
struct dentry *(*l_fid2dentry)(__u64 id_ino, __u32 gen, __u64 gr, void *data);
+ int (*l_open_llog) (__u64 id_ino, struct dentry *dentry, void *data);
};
#define OBD_RUN_CTXT_MAGIC 0xC0FFEEAA
/* lvfs_common.c */
struct dentry *lvfs_fid2dentry(struct lvfs_run_ctxt *, __u64, __u32, __u64 ,void *data);
+int lvfs_open_llog(struct lvfs_run_ctxt*, __u64, struct dentry*, void *data);
void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
struct lvfs_ucred *cred);
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
+void pop_ctxt(struct lvfs_run_ctxt *saveu, struct lvfs_run_ctxt *new_ctx,
struct lvfs_ucred *cred);
#ifdef __KERNEL__
struct vfsmount *mgs_vfsmnt;
struct super_block *mgs_sb;
struct dentry *mgs_configs_dir;
+ spinlock_t mgs_llogs_lock;
struct list_head mgs_open_llogs;
struct llog_handle *mgs_cfg_llh;
};
#include <asm/uaccess.h>
#include <linux/types.h>
#include <linux/fs.h>
+#include <linux/dcache.h>
#include <linux/time.h>
#include <linux/timer.h>
#endif
exp->exp_obd);
}
+static inline int
+obd_lvfs_open_llog(struct obd_export *exp, __u64 id_ino, struct dentry *dentry)
+{
+ LASSERT(exp->exp_obd);
+
+ return lvfs_open_llog(&exp->exp_obd->obd_lvfs_ctxt, id_ino,
+ dentry, exp->exp_obd);
+}
+
#ifndef time_before
#define time_before(t1, t2) ((long)t2 - (long)t1 > 0)
#endif
RETURN(0);
}
+static int
+lov_del_obd(struct obd_device *obd, struct obd_uuid *uuidp, int index, int gen);
+
static int lov_disconnect(struct obd_export *exp)
{
struct obd_device *obd = class_exp2obd(exp);
for (i = 0, tgt = lov->tgts; i < lov->desc.ld_tgt_count; i++, tgt++) {
if (tgt->ltd_exp) {
/* Disconnect and delete from list */
- lov_del_obd(obd, obd->obd_uuid, i, tgt->ltd_gen);
+ lov_del_obd(obd, &obd->obd_uuid, i, tgt->ltd_gen);
/* Cleanup the osc now - can't do it from
lov_cleanup because we lose our only reference to
it right now. */
{
return ctxt->cb_ops.l_fid2dentry(id, gen, gr, data);
}
+
+int lvfs_open_llog(struct lvfs_run_ctxt *ctxt, __u64 id,
+ struct dentry *dentry, void *data)
+{
+ if (ctxt->cb_ops.l_open_llog)
+ return ctxt->cb_ops.l_open_llog(id, dentry, data);
+ else
+ return 0;
+}
+
EXPORT_SYMBOL(lvfs_fid2dentry);
+EXPORT_SYMBOL(lvfs_open_llog);
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
- &mds->mds_cfg_llh, NULL, name);
+ &mds->mds_cfg_llh, NULL, NULL, name);
if (rc == 0)
llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN,
&cfg_uuid);
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
- &mds->mds_cfg_llh, NULL, name);
+ &mds->mds_cfg_llh, NULL, NULL, name);
if (rc == 0) {
llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN,
NULL);
#include <linux/lustre_log.h>
#include <linux/lustre_fsfilt.h>
#include <linux/lustre_disk.h>
-//#include <linux/lprocfs_status.h>
#include "mgc_internal.h"
-
static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb,
struct vfsmount *mnt)
{
struct mgs_obd *mgs = &obd->u.mgs;
struct lvfs_run_ctxt saved;
- struct dentry *dentry;
+ struct dentry *logs_dentry;
int rc;
ENTRY;
/* setup the directory tree */
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- dentry = simple_mkdir(current->fs->pwd, MOUNT_CONFIGS_DIR, 0777, 1);
- if (IS_ERR(dentry)) {
- rc = PTR_ERR(dentry);
+ logs_dentry = simple_mkdir(current->fs->pwd, MOUNT_CONFIGS_DIR, 0777, 1);
+ if (IS_ERR(logs_dentry)) {
+ rc = PTR_ERR(logs_dentry);
CERROR("cannot create %s directory: rc = %d\n",
MOUNT_CONFIGS_DIR, rc);
GOTO(err_pop, rc);
}
- mgs->mgs_configs_dir = dentry;
-
- INIT_LIST_HEAD(&mgs->mgs_open_llogs);
+ mgs->mgs_configs_dir = logs_dentry;
err_pop:
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
#include <linux/obd_class.h>
#include <linux/lustre_dlm.h>
-#include <linux/lustre_mgs.h>
#include <linux/lprocfs_status.h>
#include <linux/lustre_fsfilt.h>
#include <linux/lustre_commit_confd.h>
GOTO(err_put, rc);
}
+ INIT_LIST_HEAD(&mgs->mgs_open_llogs);
+
rc = llog_start_commit_thread();
if (rc < 0)
GOTO(err_fs, rc);
{
unsigned long ino = fid->id;
__u32 generation = fid->generation;
- struct mgs_open_llogs *mollog, *n;
+ struct mgs_open_llog *mollog, *n;
struct list_head *llog_list = &mgs->mgs_open_llogs;
struct inode *inode;
struct dentry *result = NULL;
ino, generation, mgs->mgs_sb);
list_for_each_entry_safe(mollog, n, llog_list, mol_list) {
- if (mollog->mod_id == ino) {
+ if (mollog->mol_id == ino) {
result = mollog->mol_dentry;
dget(result);
}
return mgs_fid2dentry(&obd->u.mgs, &fid, NULL);
}
-
-int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
- void *karg, void *uarg)
+static int mgs_lvfs_open_llog(__u64 id, struct dentry *dentry , void *data)
{
- static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" };
- struct obd_device *obd = exp->exp_obd;
+ struct obd_device *obd = data;
struct mgs_obd *mgs = &obd->u.mgs;
- struct obd_ioctl_data *data = karg;
- struct lvfs_run_ctxt saved;
- int rc = 0;
-
- ENTRY;
- CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd);
-
- switch (cmd) {
- case OBD_IOC_RECORD: {
- char *name = data->ioc_inlbuf1;
- if (mgs->mgs_cfg_llh)
- RETURN(-EBUSY);
-
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
- &mgs->mgs_cfg_llh, NULL, name);
- if (rc == 0)
- llog_init_handle(mgs->mgs_cfg_llh, LLOG_F_IS_PLAIN,
- &cfg_uuid);
- else
- mgs->mgs_cfg_llh = NULL;
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
- RETURN(rc);
- }
-
- case OBD_IOC_ENDRECORD: {
- if (!mgs->mgs_cfg_llh)
- RETURN(-EBADF);
-
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = llog_close(mgs->mgs_cfg_llh);
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
- mgs->mgs_cfg_llh = NULL;
- RETURN(rc);
- }
-
- case OBD_IOC_CLEAR_LOG: {
- char *name = data->ioc_inlbuf1;
- if (mgs->mgs_cfg_llh)
- RETURN(-EBUSY);
-
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
- &mgs->mgs_cfg_llh, NULL, name);
- if (rc == 0) {
- llog_init_handle(mgs->mgs_cfg_llh, LLOG_F_IS_PLAIN,
- NULL);
-
- rc = llog_destroy(mgs->mgs_cfg_llh);
- llog_free_handle(mgs->mgs_cfg_llh);
- }
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
- mgs->mgs_cfg_llh = NULL;
- RETURN(rc);
- }
-
- case OBD_IOC_DORECORD: {
- char *cfg_buf;
- struct llog_rec_hdr rec;
- if (!mgs->mgs_cfg_llh)
- RETURN(-EBADF);
-
- rec.lrh_len = llog_data_len(data->ioc_plen1);
-
- if (data->ioc_type == LUSTRE_CFG_TYPE) {
- rec.lrh_type = OBD_CFG_REC;
- } else {
- CERROR("unknown cfg record type:%d \n", data->ioc_type);
- RETURN(-EINVAL);
- }
-
- OBD_ALLOC(cfg_buf, data->ioc_plen1);
- if (cfg_buf == NULL)
- RETURN(-EINVAL);
- rc = copy_from_user(cfg_buf, data->ioc_pbuf1, data->ioc_plen1);
- if (rc) {
- OBD_FREE(cfg_buf, data->ioc_plen1);
- RETURN(rc);
+ struct mgs_open_llog *mollog, *n;
+ struct list_head *llog_list = &mgs->mgs_open_llogs;
+
+ list_for_each_entry_safe(mollog, n, llog_list, mol_list) {
+ if (mollog->mol_id == id) {
+ dget(dentry);
+ return 0;
}
-
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = llog_write_rec(mgs->mgs_cfg_llh, &rec, NULL, 0,
- cfg_buf, -1);
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
- OBD_FREE(cfg_buf, data->ioc_plen1);
- RETURN(rc);
}
- case OBD_IOC_PARSE: {
- struct llog_ctxt *ctxt =
- llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- if (rc)
- RETURN(rc);
-
- RETURN(rc);
+ /* add a new open llog to mgs_open_llogs */
+ OBD_ALLOC(mollog, sizeof(*mollog));
+ if (!mollog) {
+ CERROR("No memory for mollog.\n");
+ return -ENOMEM;
}
+ mollog->mol_id = id;
+ mollog->mol_dentry = dentry;
+ mollog->mol_update = 0;
- case OBD_IOC_DUMP_LOG: {
- struct llog_ctxt *ctxt =
- llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
- push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
- pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- if (rc)
- RETURN(rc);
-
- RETURN(rc);
- }
-
- case OBD_IOC_SYNC: {
- CDEBUG(D_HA, "syncing mgs %s\n", obd->obd_name);
- rc = fsfilt_sync(obd, obd->u.mgs.mgs_sb);
- RETURN(rc);
- }
-
- case OBD_IOC_SET_READONLY: {
- void *handle;
- struct inode *inode = obd->u.mgs.mgs_sb->s_root->d_inode;
- BDEVNAME_DECLARE_STORAGE(tmp);
- CERROR("*** setting device %s read-only ***\n",
- ll_bdevname(obd->u.mgs.mgs_sb, tmp));
-
- handle = fsfilt_start(obd, inode, FSFILT_OP_MKNOD, NULL);
- if (!IS_ERR(handle))
- rc = fsfilt_commit(obd, inode, handle, 1);
-
- CDEBUG(D_HA, "syncing mgs %s\n", obd->obd_name);
- rc = fsfilt_sync(obd, obd->u.mgs.mgs_sb);
-
- lvfs_set_rdonly(lvfs_sbdev(obd->u.mgs.mgs_sb));
- RETURN(0);
- }
-
-
- case OBD_IOC_LLOG_CHECK:
- case OBD_IOC_LLOG_CANCEL:
- case OBD_IOC_LLOG_REMOVE: {
- struct llog_ctxt *ctxt =
- llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-
- push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
- rc = llog_ioctl(ctxt, cmd, data);
- pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-
- RETURN(rc);
- }
- case OBD_IOC_LLOG_INFO:
- case OBD_IOC_LLOG_PRINT: {
- struct llog_ctxt *ctxt =
- llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-
- push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
- rc = llog_ioctl(ctxt, cmd, data);
- pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-
- RETURN(rc);
- }
-
- case OBD_IOC_ABORT_RECOVERY:
- CERROR("aborting recovery for device %s\n", obd->obd_name);
- target_abort_recovery(obd);
- RETURN(0);
-
- default:
- CDEBUG(D_INFO, "unknown command %x\n", cmd);
- RETURN(-EINVAL);
- }
- RETURN(0);
+ spin_lock(&mgs->mgs_llogs_lock);
+ list_add(&mollog->mol_list, &mgs->mgs_open_llogs);
+ spin_unlock(&mgs->mgs_llogs_lock);
+ return 0;
}
-
int mgs_handle(struct ptlrpc_request *req)
{
- int should_process, fail = OBD_FAIL_MGS_ALL_REPLY_NET;
+ int fail = OBD_FAIL_MGS_ALL_REPLY_NET;
int rc = 0;
struct mgs_obd *mgs = NULL; /* quell gcc overwarning */
struct obd_device *obd = NULL;
struct lvfs_callback_ops mgs_lvfs_ops = {
l_fid2dentry: mgs_lvfs_fid2dentry,
+ l_open_llog: mgs_lvfs_open_llog,
};
/* use obd ops to offer management infrastructure */
static int __init mgs_init(void)
{
- int rc;
struct lprocfs_static_vars lvars;
lprocfs_init_vars(mgs, &lvars);
#ifndef _MGS_INTERNAL_H
#define _MGS_INTERNAL_H
+#include <linux/lustre_mgs.h>
+
#define MGS_SERVICE_WATCHDOG_TIMEOUT (obd_timeout * 1000)
+extern struct lvfs_callback_ops mgs_lvfs_ops;
+
static inline struct mgs_obd *mgs_req2mgs(struct ptlrpc_request *req)
{
return &req->rq_export->exp_obd->u.mgs;
}
-struct mgs_open_llogs {
- struct list_head mol_list;
- struct dentry *mol_dentry;
- __u64 mod_id;
-};
-
-extern struct lvfs_callback_ops mgs_lvfs_ops;
-
-#endif /* _MGS_INTERNAL_H */
+#endif
--- /dev/null
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ * lustre/mgs/mgs_llog.c
+ * Lustre Management Server (mgs) llog controller
+ *
+ * Copyright (C) 2001-2005 Cluster File Systems, Inc.
+ * Author LinSongTao <lincent@clusterfs.com>
+ *
+ * This file is part of Lustre, http://www.lustre.org.
+ *
+ * Lustre is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * Lustre is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Lustre; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
+#define DEBUG_SUBSYSTEM S_MGS
+
+#ifdef __KERNEL__
+# include <linux/module.h>
+# include <linux/pagemap.h>
+#endif
+
+#include <linux/obd_class.h>
+#include <linux/lustre_mgs.h>
+#include <linux/lustre_fsfilt.h>
+#include "mgs_internal.h"
+
+static int mgs_start_record(struct obd_device *obd,
+ struct obd_ioctl_data *data)
+{
+ static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" };
+ struct mgs_obd *mgs = &obd->u.mgs;
+ struct lvfs_run_ctxt saved;
+ struct llog_handle **llog_handle;
+ char *name = data->ioc_inlbuf1;
+ char *fsname = data->ioc_inlbuf2;
+ int rc = 0;
+
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
+ llog_handle, NULL, fsname, name);
+ if (rc == 0)
+ llog_init_handle(llog_handle, LLOG_F_IS_PLAIN,
+ &cfg_uuid);
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+
+ RETURN(rc);
+}
+
+int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
+ void *karg, void *uarg)
+{
+ static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" };
+ struct obd_device *obd = exp->exp_obd;
+ struct mgs_obd *mgs = &obd->u.mgs;
+ struct obd_ioctl_data *data = karg;
+ struct lvfs_run_ctxt saved;
+ int rc = 0;
+
+ ENTRY;
+ CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd);
+
+ switch (cmd) {
+ case OBD_IOC_RECORD: {
+ char *name = data->ioc_inlbuf1;
+ char *fsname = data->ioc_inlbuf2;
+ if (mgs->mgs_cfg_llh)
+ RETURN(-EBUSY);
+
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
+ &mgs->mgs_cfg_llh, fsname, name);
+ if (rc == 0)
+ llog_init_handle(mgs->mgs_cfg_llh, LLOG_F_IS_PLAIN,
+ &cfg_uuid);
+ else
+ mgs->mgs_cfg_llh = NULL;
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+
+ RETURN(rc);
+ }
+
+ case OBD_IOC_ENDRECORD: {
+ if (!mgs->mgs_cfg_llh)
+ RETURN(-EBADF);
+
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_close(mgs->mgs_cfg_llh);
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+
+ mgs->mgs_cfg_llh = NULL;
+ RETURN(rc);
+ }
+
+ case OBD_IOC_CLEAR_LOG: {
+ char *name = data->ioc_inlbuf1;
+ if (mgs->mgs_cfg_llh)
+ RETURN(-EBUSY);
+
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
+ &mgs->mgs_cfg_llh, NULL, name);
+ if (rc == 0) {
+ llog_init_handle(mgs->mgs_cfg_llh, LLOG_F_IS_PLAIN,
+ NULL);
+
+ rc = llog_destroy(mgs->mgs_cfg_llh);
+ llog_free_handle(mgs->mgs_cfg_llh);
+ }
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+
+ mgs->mgs_cfg_llh = NULL;
+ RETURN(rc);
+ }
+
+ case OBD_IOC_DORECORD: {
+ char *cfg_buf;
+ struct llog_rec_hdr rec;
+ if (!mgs->mgs_cfg_llh)
+ RETURN(-EBADF);
+
+ rec.lrh_len = llog_data_len(data->ioc_plen1);
+
+ if (data->ioc_type == LUSTRE_CFG_TYPE) {
+ rec.lrh_type = OBD_CFG_REC;
+ } else {
+ CERROR("unknown cfg record type:%d \n", data->ioc_type);
+ RETURN(-EINVAL);
+ }
+
+ OBD_ALLOC(cfg_buf, data->ioc_plen1);
+ if (cfg_buf == NULL)
+ RETURN(-EINVAL);
+ rc = copy_from_user(cfg_buf, data->ioc_pbuf1, data->ioc_plen1);
+ if (rc) {
+ OBD_FREE(cfg_buf, data->ioc_plen1);
+ RETURN(rc);
+ }
+
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = llog_write_rec(mgs->mgs_cfg_llh, &rec, NULL, 0,
+ cfg_buf, -1);
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+
+ OBD_FREE(cfg_buf, data->ioc_plen1);
+ RETURN(rc);
+ }
+
+ case OBD_IOC_PARSE: {
+ struct llog_ctxt *ctxt =
+ llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ if (rc)
+ RETURN(rc);
+
+ RETURN(rc);
+ }
+
+ case OBD_IOC_DUMP_LOG: {
+ struct llog_ctxt *ctxt =
+ llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+ push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
+ pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ if (rc)
+ RETURN(rc);
+
+ RETURN(rc);
+ }
+
+ case OBD_IOC_SYNC: {
+ CDEBUG(D_HA, "syncing mgs %s\n", obd->obd_name);
+ rc = fsfilt_sync(obd, obd->u.mgs.mgs_sb);
+ RETURN(rc);
+ }
+
+ case OBD_IOC_SET_READONLY: {
+ void *handle;
+ struct inode *inode = obd->u.mgs.mgs_sb->s_root->d_inode;
+ BDEVNAME_DECLARE_STORAGE(tmp);
+ CERROR("*** setting device %s read-only ***\n",
+ ll_bdevname(obd->u.mgs.mgs_sb, tmp));
+
+ handle = fsfilt_start(obd, inode, FSFILT_OP_MKNOD, NULL);
+ if (!IS_ERR(handle))
+ rc = fsfilt_commit(obd, inode, handle, 1);
+
+ CDEBUG(D_HA, "syncing mgs %s\n", obd->obd_name);
+ rc = fsfilt_sync(obd, obd->u.mgs.mgs_sb);
+
+ lvfs_set_rdonly(lvfs_sbdev(obd->u.mgs.mgs_sb));
+ RETURN(0);
+ }
+
+
+ case OBD_IOC_LLOG_CHECK:
+ case OBD_IOC_LLOG_CANCEL:
+ case OBD_IOC_LLOG_REMOVE: {
+ struct llog_ctxt *ctxt =
+ llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+
+ push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
+ rc = llog_ioctl(ctxt, cmd, data);
+ pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
+
+ RETURN(rc);
+ }
+ case OBD_IOC_LLOG_INFO:
+ case OBD_IOC_LLOG_PRINT: {
+ struct llog_ctxt *ctxt =
+ llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+
+ push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
+ rc = llog_ioctl(ctxt, cmd, data);
+ pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
+
+ RETURN(rc);
+ }
+
+ case OBD_IOC_ABORT_RECOVERY:
+ CERROR("aborting recovery for device %s\n", obd->obd_name);
+ target_abort_recovery(obd);
+ RETURN(0);
+
+ default:
+ CDEBUG(D_INFO, "unknown command %x\n", cmd);
+ RETURN(-EINVAL);
+ }
+ RETURN(0);
+}
llh->llh_tail.lrt_index = index;
}
- rc = llog_create(cathandle->lgh_ctxt, &loghandle, NULL, NULL);
+ rc = llog_create(cathandle->lgh_ctxt, &loghandle, NULL, NULL, NULL);
if (rc)
RETURN(ERR_PTR(rc));
}
}
- rc = llog_create(cathandle->lgh_ctxt, &loghandle, logid, NULL);
+ rc = llog_create(cathandle->lgh_ctxt, &loghandle, logid, NULL, NULL);
if (rc) {
CERROR("error opening log id "LPX64":%x: rc %d\n",
logid->lgl_oid, logid->lgl_ogen, rc);
err = str2logid(&logid, data->ioc_inlbuf1, data->ioc_inllen1);
if (err)
GOTO(out, err);
- err = llog_create(ctxt, &handle, &logid, NULL);
+ err = llog_create(ctxt, &handle, &logid, NULL, NULL);
if (err)
GOTO(out, err);
} else if (*data->ioc_inlbuf1 == '$') {
char *name = data->ioc_inlbuf1 + 1;
- err = llog_create(ctxt, &handle, NULL, name);
+ err = llog_create(ctxt, &handle, NULL, NULL, name);
if (err)
GOTO(out, err);
} else {
OBD_ALLOC(logname, PATH_MAX);
if (logname == NULL)
return ERR_PTR(-ENOMEM);
-//FIXME: Need to changing mkfs
-// if (fsname)
-// len = snprintf(logname, PATH_MAX, "%s/%s/%s", MOUNT_CONFIGS_DIR, fsname, name);
-// else
+ if (fsname)
+ len = snprintf(logname, PATH_MAX, "%s/%s/%s",
+ MOUNT_CONFIGS_DIR, fsname, name);
+ else
len = snprintf(logname, PATH_MAX, "%s/%s",
MOUNT_CONFIGS_DIR, name);
handle->lgh_id = *logid;
} else if (name) {
- handle->lgh_file = llog_filp_open(fsname, name, open_flags, 0644);
+ handle->lgh_file = llog_filp_open(fsname,
+ name, open_flags, 0644);
+
if (IS_ERR(handle->lgh_file))
GOTO(cleanup, rc = PTR_ERR(handle->lgh_file));
-
+ rc = obd_lvfs_open_llog(ctxt->loc_exp,
+ handle->lgh_file->f_dentry->d_inode->i_ino,
+ handle->lgh_file->f_dentry);
+ if (rc)
+ GOTO(cleanup, rc);
handle->lgh_id.lgl_ogr = 1;
handle->lgh_id.lgl_oid =
handle->lgh_file->f_dentry->d_inode->i_ino;
handle->lgh_id.lgl_ogen =
handle->lgh_file->f_dentry->d_inode->i_generation;
+
} else {
oa = obdo_alloc();
if (oa == NULL)
llog_gen_init(ctxt);
if (logid->lgl_oid)
- rc = llog_create(ctxt, &handle, logid, NULL);
+ rc = llog_create(ctxt, &handle, logid, NULL, NULL);
else {
- rc = llog_create(ctxt, &handle, NULL, NULL);
+ rc = llog_create(ctxt, &handle, NULL, NULL, NULL);
if (!rc)
*logid = handle->lgh_id;
}
if (!(portal_debug & D_OTHER)) /* don't loop on nothing */
return;
CDEBUG(D_OTHER, "lustre_cfg: %p\n", lcfg);
+ CDEBUG(D_OTHER, "\tlcfg->lcfg_magic: %#x\n", lcfg->lcfg_magic);
CDEBUG(D_OTHER, "\tlcfg->lcfg_version: %#x\n", lcfg->lcfg_version);
CDEBUG(D_OTHER, "\tlcfg->lcfg_command: %#x\n", lcfg->lcfg_command);
int i;
ENTRY;
- __swab32s(&lcfg->lcfg_version);
+ __swab32s(&lcfg->lcfg_magic);
- if (lcfg->lcfg_version != LUSTRE_CFG_VERSION) {
- CERROR("not swabbing lustre_cfg version %#x (expecting %#x)\n",
- lcfg->lcfg_version, LUSTRE_CFG_VERSION);
+ if (lcfg->lcfg_magic != LUSTRE_CFG_MAGIC) {
+ CERROR("not swabbing lustre_cfg magic %#x (expecting %#x)\n",
+ lcfg->lcfg_magic, LUSTRE_CFG_MAGIC);
EXIT;
return;
}
+ __swab32s(&lcfg->lcfg_version);
__swab32s(&lcfg->lcfg_command);
__swab32s(&lcfg->lcfg_num);
CWARN("1a: create a log with name: %s\n", name);
LASSERT(ctxt);
- rc = llog_create(ctxt, &llh, NULL, name);
+ rc = llog_create(ctxt, &llh, NULL, NULL, name);
if (rc) {
CERROR("1a: llog_create with name %s failed: %d\n", name, rc);
RETURN(rc);
ENTRY;
CWARN("2a: re-open a log with name: %s\n", name);
- rc = llog_create(ctxt, llh, NULL, name);
+ rc = llog_create(ctxt, llh, NULL, NULL, name);
if (rc) {
CERROR("2a: re-open log with name %s failed: %d\n", name, rc);
RETURN(rc);
RETURN(rc);
CWARN("2b: create a log without specified NAME & LOGID\n");
- rc = llog_create(ctxt, &loghandle, NULL, NULL);
+ rc = llog_create(ctxt, &loghandle, NULL, NULL, NULL);
if (rc) {
CERROR("2b: create log failed\n");
RETURN(rc);
llog_close(loghandle);
CWARN("2b: re-open the log by LOGID\n");
- rc = llog_create(ctxt, &loghandle, &logid, NULL);
+ rc = llog_create(ctxt, &loghandle, &logid, NULL, NULL);
if (rc) {
CERROR("2b: re-open log by LOGID failed\n");
RETURN(rc);
sprintf(name, "%x", llog_test_rand+1);
CWARN("4a: create a catalog log with name: %s\n", name);
- rc = llog_create(ctxt, &cath, NULL, name);
+ rc = llog_create(ctxt, &cath, NULL, NULL, name);
if (rc) {
CERROR("1a: llog_create with name %s failed: %d\n", name, rc);
GOTO(out, rc);
lmr.lmr_hdr.lrh_type = 0xf00f00;
CWARN("5a: re-open catalog by id\n");
- rc = llog_create(ctxt, &llh, &cat_logid, NULL);
+ rc = llog_create(ctxt, &llh, &cat_logid, NULL, NULL);
if (rc) {
CERROR("5a: llog_create with logid failed: %d\n", rc);
GOTO(out, rc);
exp = class_conn2export(&exph);
nctxt = llog_get_context(mdc_obd, LLOG_CONFIG_REPL_CTXT);
- rc = llog_create(nctxt, &llh, NULL, name);
+ rc = llog_create(nctxt, &llh, NULL, NULL, name);
if (rc) {
CERROR("6: llog_create failed %d\n", rc);
RETURN(rc);
CWARN("7: create a log with name: %s\n", name);
LASSERT(ctxt);
- rc = llog_create(ctxt, &llh, NULL, name);
+ rc = llog_create(ctxt, &llh, NULL, NULL, name);
if (rc) {
CERROR("7: llog_create with name %s failed: %d\n", name, rc);
RETURN(rc);
int inst = 0;
lcfg = (struct lustre_cfg *)cfg_buf;
- if (lcfg->lcfg_version == __swab32(LUSTRE_CFG_VERSION))
+ if (lcfg->lcfg_magic == __swab32(LUSTRE_CFG_MAGIC))
lustre_swab_lustre_cfg(lcfg);
rc = lustre_cfg_sanity_check(cfg_buf, cfg_len);
ENTRY;
CDEBUG(D_INFO, "looking up llog %s\n", name);
- rc = llog_create(ctxt, &llh, NULL, name);
+ rc = llog_create(ctxt, &llh, NULL, NULL, name);
if (rc)
RETURN(rc);
int rc, rc2;
ENTRY;
- rc = llog_create(ctxt, &llh, NULL, name);
+ rc = llog_create(ctxt, &llh, NULL, NULL, name);
if (rc)
RETURN(rc);
#include <linux/lvfs.h>
#include <linux/lustre_disk.h>
#include <linux/lustre_fsfilt.h>
+#include <linux/lustre_mgs.h>
#include <linux/obd_class.h>
#include <lustre/lustre_user.h>
#include <linux/version.h>
/* Process all local logs.
FIXME clients and servers should use the same fn. No need to have MDS
do client and confobd do servers. MGC should do both. */
-int lustre_process_logs(struct super_block *sb,
- struct config_llog_instance *cfg, int allow_recov)
+int lustre_process_logs(struct super_block *sb, int allow_recov)
{
struct obd_ioctl_data ioc_data = { 0 };
struct list_head dentry_list;
continue;
}
logname[len] = 0;
-
+
CERROR("starting log %s\n", logname);
ioc_data.ioc_inllen1 = len + 1;
ioc_data.ioc_inlbuf1 = logname;
return(err);
}
+/* Set up a mgsobd to process startup logs */
+static int lustre_start_mgs(struct super_block *sb, struct vfsmount *mnt)
+{
+ struct config_llog_instance cfg;
+ char* mgsname;
+ int mgsname_size, err = 0;
+
+ mgsname_size = 2 * sizeof(sb) + 5;
+ OBD_ALLOC(mgsname, mgsname_size);
+ if (!mgsname)
+ GOTO(out, err = -ENOMEM);
+ sprintf(mgsname, "MGS_%p", sb);
+
+ err = lustre_register_mount(mgsname, sb, mnt);
+ if (err)
+ GOTO(out_free, err);
+
+ cfg.cfg_instance = mgsname;
+ snprintf(cfg.cfg_uuid.uuid, sizeof(cfg.cfg_uuid.uuid), mgsname);
+
+ err = do_lcfg(mgsname, 0, LCFG_ATTACH, LUSTRE_MGS_NAME, cfg.cfg_uuid.uuid, 0, 0);
+ if (err)
+ GOTO(out_dereg, err);
+
+ err = do_lcfg(mgsname, 0, LCFG_SETUP, 0, 0, 0, 0);
+ if (err) {
+ CERROR("mgsobd setup error %d\n", err);
+ do_lcfg(mgsname, 0, LCFG_DETACH, 0, 0, 0, 0);
+ GOTO(out_dereg, err);
+ }
+
+out_free:
+ OBD_FREE(mgsname, mgsname_size);
+out:
+ return err;
+out_dereg:
+ lustre_deregister_mount(mgsname);
+ goto out_free;
+}
+
+static void lustre_stop_mgs(struct super_block *sb)
+{
+ struct obd_device *obd;
+ char mgsname[2 * sizeof(sb) + 5];
+
+ sprintf(mgsname, "MGS_%p", sb);
+
+ obd = class_name2obd(mgsname);
+ if (!obd) {
+ CERROR("Can not get mgs obd!\n");
+ goto out;
+ }
+ class_manual_cleanup(obd, NULL);
+out:
+ return;
+}
+
/* Set up a mgcobd to process startup logs */
-static int lustre_start_mgc(char *mgcname, struct super_block *sb)
+static int lustre_start_mgc(struct super_block *sb, struct vfsmount *mnt)
{
struct config_llog_instance cfg;
struct lustre_sb_info *sbi = s2sbi(sb);
struct obd_device *obd;
- int err = 0;
+ char* mgcname;
+ int mgcname_size, err = 0;
+
+ mgcname_size = 2 * sizeof(sb) + 5;
+ OBD_ALLOC(mgcname, mgcname_size);
+ if (!mgcname)
+ GOTO(out, err = -ENOMEM);
+ sprintf(mgcname, "MGC_%p", sb);
+
+ /* register a mount for the mgc so it can call mgc_fs_setup() */
+ if (mnt != NULL) {
+ err = lustre_register_mount(mgcname, sb, mnt);
+ if (err)
+ GOTO(out_free, err);
+ }
cfg.cfg_instance = mgcname;
snprintf(cfg.cfg_uuid.uuid, sizeof(cfg.cfg_uuid.uuid), mgcname);
err = do_lcfg(mgcname, 0, LCFG_ATTACH, LUSTRE_MGC_NAME, cfg.cfg_uuid.uuid, 0, 0);
if (err)
- goto out_free;
+ GOTO(out_dereg, err);
err = do_lcfg(mgcname, 0, LCFG_SETUP, 0, 0, 0, 0);
if (err) {
CERROR("mgcobd setup error %d\n", err);
do_lcfg(mgcname, 0, LCFG_DETACH, 0, 0, 0, 0);
- goto out_free;
+ GOTO(out_dereg, err);
+ }
+
+ if (sbi->lsi_ldd->ldd_flags & LDD_F_NEED_INDEX) {
+ // FIXME implement
+ CERROR("Need new server index from MGS!\n");
+ // rewrite last_rcvd, ldd (for new svname)
}
obd = class_name2obd(mgcname);
if (!obd) {
CERROR("Can't find mgcobd %s\n", mgcname);
- err = -ENOTCONN;
- goto out_free;
+ GOTO(out_dereg, err = -ENOTCONN);
}
sbi->lsi_mgc = obd;
out_free:
+ OBD_FREE(mgcname, mgcname_size);
+out:
return err;
+out_dereg:
+ lustre_deregister_mount(mgcname);
+ goto out_free;
}
static void lustre_stop_mgc(struct super_block *sb)
mount_ctxt.pwdmnt = mnt;
mount_ctxt.pwd = mnt->mnt_root;
mount_ctxt.fs = get_ds();
- //mount_ctxt.cb_ops = mds_lvfs_ops;
err = parse_mount_data(&mount_ctxt, ldd);
unlock_mntput(mnt);
static int server_fill_super(struct super_block *sb)
{
- struct config_llog_instance cfg;
struct lustre_sb_info *sbi = s2sbi(sb);
struct vfsmount *mnt;
- char *mgcname;
- int mgcname_sz = sizeof(sb) * 2 + 5;
- int err;
+ int mgs_service = 0, err;
ENTRY;
- /* Generate a string unique to this super, let's try
- the address of the super itself.*/
- OBD_ALLOC(mgcname, mgcname_sz);
- if (!mgcname)
- GOTO(out, err = -ENOMEM);
- sprintf(mgcname, "MGC_%p", sb);
-
/* mount to read server info */
mnt = lustre_kern_mount(sb);
if (IS_ERR(mnt)) {
CERROR("Found service %s for fs %s on device %s\n",
sbi->lsi_ldd->ldd_svname, sbi->lsi_ldd->ldd_fsname,
sbi->lsi_lmd->lmd_dev);
-
- /* register a mount for the mgc so it can call mgc_fs_setup() */
- err = lustre_register_mount(mgcname, sb, mnt);
+
+ err = lustre_register_mount(sbi->lsi_ldd->ldd_svname, sb, mnt);
if (err)
GOTO(out, err);
- err = lustre_start_mgc(mgcname, sb);
- //part of mgc_startup err = mgc_fs_setup(sb, mnt);
+ if (sbi->lsi_ldd->ldd_flags & LDD_F_SV_TYPE_MGMT) {
+ CERROR("Found MGS service for fs %s on device %s\n",
+ sbi->lsi_ldd->ldd_fsname, sbi->lsi_lmd->lmd_dev);
+ mgs_service++;
+ err = lustre_start_mgs(sb, mnt);
+ if (err)
+ GOTO(out_dereg, err);
+ }
+
+ err = lustre_start_mgc(sb, mnt);
if (err)
GOTO(out_dereg, err);
- /* we also need to register a mount for the real server */
- err = lustre_register_mount(sbi->lsi_ldd->ldd_svname, sb, mnt);
- if (err)
- GOTO(out_dereg, err);
-
-
- if (sbi->lsi_ldd->ldd_flags & LDD_F_NEED_INDEX) {
- // FIXME implement
- CERROR("Need new server index from MGS!\n");
- // rewrite last_rcvd, ldd (for new svname)
- }
- // FIXME register with MGS
-
/* Set up all obd devices for service */
- cfg.cfg_instance = mgcname;
- snprintf(cfg.cfg_uuid.uuid, sizeof(cfg.cfg_uuid.uuid), mgcname);
- err = lustre_process_logs(sb, &cfg, 0);
+ err = lustre_process_logs(sb, 0);
if (err < 0) {
CERROR("Unable to process log: %d\n", err);
GOTO(out_dereg, err);
}
- /* Finally, put something at the mount point. */
CERROR("Mounting server\n");
err = server_fill_super_common(sb);
if (err)
have to fix up the s_ops after! */
out:
//FIXME mntput
- if (mgcname)
- OBD_FREE(mgcname, mgcname_sz);
if (sbi->lsi_ldd)
// FIXME ??
class_del_profile(sbi->lsi_ldd->ldd_svname);
RETURN(err);
out_dereg:
- lustre_deregister_mount(mgcname);
+ if (mgs_service)
+ lustre_stop_mgs(sb);
lustre_deregister_mount(sbi->lsi_ldd->ldd_svname);
goto out;
}
}
memcpy(sbi->lsi_lmd, lmd, sizeof(*lmd));
-
if (lmd_is_client(lmd)) {
if (!client_fill_super) {
CERROR("Nothing registered for client_fill_super!\n"
snprintf(mgcname, sizeof(mgcname), "mgc-client-%s",
lmd->lmd_dev);
CERROR("Mounting client\n");
- err = lustre_start_mgc(mgcname, sb);
+ err = lustre_start_mgc(sb, NULL);
if (err) {
lustre_free_sbi(sb);
RETURN(err);
disk_obd = ctxt->loc_exp->exp_obd;
push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(ctxt, &loghandle, logid, name);
+ rc = llog_create(ctxt, &loghandle, logid, NULL, name);
if (rc)
GOTO(out_pop, rc);
disk_obd = ctxt->loc_exp->exp_obd;
push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL);
+ rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL, NULL);
if (rc)
GOTO(out_pop, rc);
disk_obd = ctxt->loc_exp->exp_obd;
push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL);
+ rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL, NULL);
if (rc)
GOTO(out_pop, rc);
for (i = 0; i < 4; i++) {
int index, uncanceled = 0;
- rc = llog_create(ctxt, &handle, NULL, name[i]);
+ rc = llog_create(ctxt, &handle, NULL, NULL, name[i]);
if (rc)
GOTO(out_pop, rc);
rc = llog_init_handle(handle, 0, NULL);
lir = (struct llog_logid_rec *)rec;
logid = &lir->lid_id;
- rc = llog_create(ctxt, &handle, logid, NULL);
+ rc = llog_create(ctxt, &handle, logid, NULL, NULL);
if (rc)
RETURN(-EINVAL);
rc = llog_init_handle(handle, 0, NULL);
int l, index, uncanceled = 0;
id = &idarray[i].lci_logid;
- rc = llog_create(ctxt, &handle, id, NULL);
+ rc = llog_create(ctxt, &handle, id, NULL, NULL);
if (rc)
GOTO(out_pop, rc);
rc = llog_init_handle(handle, 0, NULL);
SIGNAL_MASK_UNLOCK(current, flags);
unlock_kernel();
- rc = llog_create(ctxt, &llh, &logid, NULL);
+ rc = llog_create(ctxt, &llh, &logid, NULL, NULL);
if (rc) {
CERROR("llog_create failed %d\n", rc);
RETURN(rc);