ltd->ltd_refcount--;
if (ltd->ltd_refcount == 0 && ltd->ltd_death_row) {
struct lod_tgt_desc *tgt_desc, *tmp;
- struct list_head kill;
+ LIST_HEAD(kill);
CDEBUG(D_CONFIG, "destroying %d ltd desc\n",
ltd->ltd_death_row);
- INIT_LIST_HEAD(&kill);
-
ltd_foreach_tgt_safe(ltd, tgt_desc, tmp) {
LASSERT(tgt_desc);
if (!tgt_desc->ltd_reap)
RETURN(rc);
}
}
+ /* Any stripe count is forbidden on DoM component */
+ if (lum->lmm_stripe_count) {
+ CDEBUG(D_LAYOUT,
+ "invalid DoM layout stripe count %u, must be 0\n",
+ le16_to_cpu(lum->lmm_stripe_count));
+ RETURN(-EINVAL);
+ }
+
+ /* Any pool is forbidden on DoM component */
+ if (lum->lmm_magic == LOV_USER_MAGIC_V3) {
+ struct lov_user_md_v3 *v3 = (void *)lum;
+
+ if (v3->lmm_pool_name[0] != '\0') {
+ CDEBUG(D_LAYOUT,
+ "DoM component cannot have pool assigned\n");
+ RETURN(-EINVAL);
+ }
+ }
}
prev_end = le64_to_cpu(ext->e_end);
lod->lod_sp_me = LUSTRE_SP_CLI;
/* Set up OST pool environment */
- lod->lod_pools_hash_body = cfs_hash_create("POOLS", HASH_POOLS_CUR_BITS,
- HASH_POOLS_MAX_BITS,
- HASH_POOLS_BKT_BITS, 0,
- CFS_HASH_MIN_THETA,
- CFS_HASH_MAX_THETA,
- &pool_hash_operations,
- CFS_HASH_DEFAULT);
- if (lod->lod_pools_hash_body == NULL)
+ lod->lod_pool_count = 0;
+ rc = lod_pool_hash_init(&lod->lod_pools_hash_body);
+ if (rc)
RETURN(-ENOMEM);
INIT_LIST_HEAD(&lod->lod_pool_list);
out_mdt_pool:
lod_tgt_pool_free(&lod->lod_mdt_descs.ltd_tgt_pool);
out_hash:
- cfs_hash_putref(lod->lod_pools_hash_body);
+ lod_pool_hash_destroy(&lod->lod_pools_hash_body);
return rc;
}
lod_pool_del(obd, pool->pool_name);
}
- cfs_hash_putref(lod->lod_pools_hash_body);
+ lod_pool_hash_destroy(&lod->lod_pools_hash_body);
lod_tgt_pool_free(&lod->lod_ost_descs.ltd_qos.lq_rr.lqr_pool);
lod_tgt_pool_free(&lod->lod_ost_descs.ltd_tgt_pool);
lod_tgt_pool_free(&lod->lod_mdt_descs.ltd_qos.lq_rr.lqr_pool);