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,
lmm = (struct lov_mds_md_v3 *)lmmv1;
lsm_unpackmd_common(lsm, (struct lov_mds_md_v1 *)lmm);
- strncpy(lsm->lsm_pool_name, lmm->lmm_pool_name, MAXPOOLNAME);
+ strncpy(lsm->lsm_pool_name, lmm->lmm_pool_name, LOV_MAXPOOLNAME);
for (i = 0; i < lsm->lsm_stripe_count; i++) {
/* XXX LOV STACKING call down to osc_unpackmd() */
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,