/* cmm_object.c */
struct lu_object *cmm_object_alloc(const struct lu_context *ctx,
+ const struct lu_object_header *hdr,
struct lu_device *);
#endif /* __KERNEL__ */
#endif /* _CMM_INTERNAL_H */
}
struct lu_object *cmm_object_alloc(const struct lu_context *ctx,
+ const struct lu_object_header *hdr,
struct lu_device *ld)
{
struct cmm_object *co;
if (c_dev == NULL) {
rc = -ENOENT;
} else {
- c_obj = c_dev->ld_ops->ldo_object_alloc(ctx, c_dev);
+ c_obj = c_dev->ld_ops->ldo_object_alloc(ctx,
+ lo->lo_header, c_dev);
if (c_obj != NULL) {
struct cmm_object *co = lu2cmm_obj(lo);
}
struct lu_object *mdc_object_alloc(const struct lu_context *,
+ const struct lu_object_header *,
struct lu_device *);
#endif /* __KERNEL__ */
#endif /* _CMM_MDC_INTERNAL_H */
static struct lu_object_operations mdc_obj_ops;
struct lu_object *mdc_object_alloc(const struct lu_context *ctx,
+ const struct lu_object_header *hdr,
struct lu_device *ld)
{
struct mdc_object *mco;
* result->lo_ops != NULL);
*/
struct lu_object *(*ldo_object_alloc)(const struct lu_context *ctx,
+ const struct lu_object_header *h,
struct lu_device *d);
/*
* process config specific for device
struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *,
const struct lustre_handle *);
-static inline struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *h)
+static inline struct ldlm_lock *ldlm_handle2lock(const struct lustre_handle *h)
{
return __ldlm_handle2lock(h, 0);
}
}
static struct lu_object *mdd_object_alloc(const struct lu_context *ctxt,
+ const struct lu_object_header *hdr,
struct lu_device *d)
{
struct mdd_object *mdo;
ENTRY;
under = &d->mdd_child->dd_lu_dev;
- below = under->ld_ops->ldo_object_alloc(ctxt, under);
+ below = under->ld_ops->ldo_object_alloc(ctxt, o->lo_header, under);
if (below == NULL)
RETURN(-ENOMEM);
}
static struct lu_object *mdt_object_alloc(const struct lu_context *ctxt,
+ const struct lu_object_header *hdr,
struct lu_device *d)
{
struct mdt_object *mo;
struct lu_object *below;
under = &d->mdt_child->md_lu_dev;
- below = under->ld_ops->ldo_object_alloc(ctxt, under);
+ below = under->ld_ops->ldo_object_alloc(ctxt, o->lo_header, under);
if (below != NULL) {
lu_object_add(o, below);
return 0;
* Create top-level object slice. This will also create
* lu_object_header.
*/
- top = s->ls_top_dev->ld_ops->ldo_object_alloc(ctxt, s->ls_top_dev);
+ top = s->ls_top_dev->ld_ops->ldo_object_alloc(ctxt,
+ NULL, s->ls_top_dev);
if (IS_ERR(top))
RETURN(top);
s->ls_total ++;
int lu_object_header_init(struct lu_object_header *h)
{
memset(h, 0, sizeof *h);
- h->loh_ref = 1;
+ h->loh_ref = 1;
INIT_HLIST_NODE(&h->loh_hash);
CFS_INIT_LIST_HEAD(&h->loh_lru);
CFS_INIT_LIST_HEAD(&h->loh_layers);
struct lu_device_type *t,
struct lustre_cfg *cfg);
static struct lu_object *osd_object_alloc (const struct lu_context *ctx,
+ const struct lu_object_header *hdr,
struct lu_device *d);
static struct inode *osd_iget (struct osd_thread_info *info,
struct osd_device *dev,
*/
static struct lu_object *osd_object_alloc(const struct lu_context *ctx,
+ const struct lu_object_header *hdr,
struct lu_device *d)
{
struct osd_object *mo;
result = osd_fid_lookup(ctxt, obj, lu_object_fid(l));
if (result == 0) {
- /*FIXME: put osd_index_ops here for tmp fix WANGDI*/
- obj->oo_dt.do_index_ops = &osd_index_ops;
if (obj->oo_inode != NULL)
osd_object_init0(obj);
}
dentry = osd_open(osd_sb(osd)->s_root, osd_fld_name,
S_IFREG);
if (IS_ERR(dentry)) {
- CERROR("can not open %s, rc = %d \n", osd_fld_name,
+ CERROR("can not open %s, rc = %ld\n", osd_fld_name,
PTR_ERR(dentry));
return (PTR_ERR(dentry));
}
.dio_lookup = osd_index_lookup,
.dio_insert = osd_index_insert,
.dio_probe = osd_index_probe,
- .dio_init = osd_index_init,
- .dio_fini = osd_index_fini,
};
/*