return NULL;;
for (i = 0; i < stripe_count; i++) {
- OBD_SLAB_ALLOC(loi, lov_oinfo_slab, CFS_ALLOC_IO, sizeof(*loi));
+ OBD_SLAB_ALLOC_PTR_GFP(loi, lov_oinfo_slab, CFS_ALLOC_IO);
if (loi == NULL)
goto err;
lsm->lsm_oinfo[i] = loi;
return 0;
}
-struct lsm_operations lsm_v1_ops = {
+const struct lsm_operations lsm_v1_ops = {
.lsm_free = lsm_free_plain,
.lsm_destroy = lsm_destroy_plain,
.lsm_stripe_by_index = lsm_stripe_by_index_plain,
OBD_ALLOC(lsm->lsm_array->lai_ext_array,lsm->lsm_array->lai_ext_count *
sizeof (struct lov_extent));
if (!lsm->lsm_array->lai_ext_array)
- GOTO(release_ctxt, rc = -ENOMEM);
+ GOTO(release_ctxt, rc = -ENOMEM);
CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n",
lsm->lsm_array->lai_array_id.lgl_oid,
RETURN(rc);
}
-int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa,
+int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa,
struct obd_export *md_exp)
{
struct llog_ctxt *ctxt;
RETURN(rc);
}
-struct lsm_operations lsm_join_ops = {
+const struct lsm_operations lsm_join_ops = {
.lsm_free = lsm_free_join,
.lsm_destroy = lsm_destroy_join,
.lsm_stripe_by_index = lsm_stripe_by_index_join,
return 0;
}
-struct lsm_operations lsm_v3_ops = {
+const struct lsm_operations lsm_v3_ops = {
.lsm_free = lsm_free_plain,
.lsm_destroy = lsm_destroy_plain,
.lsm_stripe_by_index = lsm_stripe_by_index_plain,