-
- rc = mds_lov_update_desc(obd, mds->mds_osc_exp);
- if (rc)
- GOTO(err_reg, rc);
-
- /* tgt_count may be 0! */
- rc = llog_cat_initialize(obd, &obd->obd_olg,
- mds->mds_lov_desc.ld_tgt_count, NULL);
- if (rc) {
- CERROR("failed to initialize catalog %d\n", rc);
- GOTO(err_reg, rc);
- }
-
- /* If we're mounting this code for the first time on an existing FS,
- * we need to populate the objids array from the real OST values */
- if (mds->mds_lov_desc.ld_tgt_count > mds->mds_lov_objid_count) {
- __u32 i = mds->mds_lov_objid_count;
- for(; i <= mds->mds_lov_desc.ld_tgt_count; i++) {
- rc = mds_lov_get_objid(obd, i);
- if (rc != 0)
- break;
- }
- if (rc == 0)
- rc = mds_lov_write_objids(obd);
- if (rc)
- CERROR("got last objids from OSTs, but error "
- "in update objids file: %d\n", rc);
- }