static struct lu_device_operations cmm_lu_ops;
-static int lu_device_is_cmm(struct lu_device *d)
+static inline int lu_device_is_cmm(struct lu_device *d)
{
/*
* XXX for now. Tags in lu_device_type->ldt_something are needed.
/* retrieve size of EA */
rc = obd_get_info(mds->mds_md_exp, strlen("mdsize"),
"mdsize", &valsize, &value);
- if (rc)
+ if (rc)
GOTO(err_reg, rc);
if (value > mds->mds_max_mdsize)
/* find our number in LMV cluster */
rc = obd_get_info(mds->mds_md_exp, strlen("mdsnum"),
"mdsnum", &valsize, &value);
- if (rc)
+ if (rc)
GOTO(err_reg, rc);
-
+
mds->mds_num = value;
rc = obd_set_info(mds->mds_md_exp, strlen("inter_mds"),
if (flags & OBD_OPT_FORCE) {
struct obd_device *lmv_obd;
struct obd_ioctl_data ioc_data = { 0 };
-
+
lmv_obd = class_exp2obd(mds->mds_md_exp);
if (lmv_obd == NULL)
GOTO(out, rc = 0);
- /*
+ /*
* making disconnecting lmv stuff do not send anything
* to all remote MDSs from LMV. This is needed to
* prevent possible hanging with endless recovery, when
lu_dev->ld_ops = &cmm_lu_ops;
snprintf(ns_name, sizeof ns_name, LUSTRE_CMM0_NAME"-%p", m);
-
+
return 0;
}
{
struct lu_device *l;
struct cmm_device *m;
-
+
OBD_ALLOC_PTR(m);
if (m == NULL) {
l = ERR_PTR(-ENOMEM);
} else {
int err;
-
+
err = cmm_init(m, t, cfg);
- if (!err)
+ if (!err)
l = cmm2lu_dev(m);
- else
+ else
l = ERR_PTR(err);
}
-
+
return l;
}
/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
- *
+ *
* Extention of lu_object.h for metadata objects
- *
+ *
* Copyright (C) 2006 Cluster File Systems, Inc.
*
* This file is part of Lustre, http://www.lustre.org.
int (*mdo_root_get)(struct md_device *m, struct lu_fid *f);
int (*mdo_mkdir)(struct md_object *obj, const char *name,
struct md_object *child);
-
+
int (*mdo_rename)(struct md_object *spobj, struct md_object *tpobj,
struct md_object *sobj, const char *sname,
- struct md_object *tobj, const char *tname,
+ struct md_object *tobj, const char *tname,
struct context *uctxt);
int (*mdo_link)(struct md_object *tobj, struct md_object *sobj,
const char *name, struct context *uctxt);
int (*mdo_attr_get)(struct md_object *obj, void *buf, int buf_len,
- const char *name, struct context *uctxt);
- int (*mdo_attr_set)(struct md_object *obj, void *buf, int buf_len,
const char *name, struct context *uctxt);
- int (*mdo_index_insert)(struct md_object *pobj, struct md_object *obj,
+ int (*mdo_attr_set)(struct md_object *obj, void *buf, int buf_len,
+ const char *name, struct context *uctxt);
+ int (*mdo_index_insert)(struct md_object *pobj, struct md_object *obj,
const char *name, struct context *uctxt);
- int (*mdo_index_delete)(struct md_object *pobj, struct md_object *obj,
+ int (*mdo_index_delete)(struct md_object *pobj, struct md_object *obj,
const char *name, struct context *uctxt);
int (*mdo_object_create)(struct md_object *pobj, struct md_object *child,
struct context *uctxt);
return container_of(o->mo_lu.lo_dev, struct md_device, md_lu_dev);
}
-static int md_device_init(struct md_device *md, struct lu_device_type *t)
+static inline int md_device_init(struct md_device *md, struct lu_device_type *t)
{
return lu_device_init(&md->md_lu_dev, t);
}
-static void md_device_fini(struct md_device *md)
+static inline void md_device_fini(struct md_device *md)
{
lu_device_fini(&md->md_lu_dev);
}