#define OBD_FAIL_OSD_LMA_INCOMPAT 0x194
#define OBD_FAIL_OSD_COMPAT_INVALID_ENTRY 0x195
#define OBD_FAIL_OSD_COMPAT_NO_ENTRY 0x196
+#define OBD_FAIL_OSD_OST_EA_FID_SET 0x197
#define OBD_FAIL_OST 0x200
#define OBD_FAIL_OST_CONNECT_NET 0x201
/* to get subdir count from last_rcvd */
rc = osd_last_rcvd_subdir_count(dev);
- if (rc < 0) {
- OBD_FREE_PTR(dev->od_ost_map);
- RETURN(rc);
- }
+ if (rc < 0)
+ GOTO(cleanup_alloc, rc);
dev->od_ost_map->om_subdir_count = rc;
rc = 0;
d = ll_lookup_one_len("O", rootd, strlen("O"));
if (IS_ERR(d))
- GOTO(cleanup, rc = PTR_ERR(d));
+ GOTO(cleanup_ctxt, rc = PTR_ERR(d));
if (d->d_inode == NULL) {
dput(d);
/* The lookup() may be called again inside simple_mkdir().
* mount time, it will not affect the whole performance. */
d = simple_mkdir(rootd, dev->od_mnt, "O", 0755, 1);
if (IS_ERR(d))
- GOTO(cleanup, rc = PTR_ERR(d));
+ GOTO(cleanup_ctxt, rc = PTR_ERR(d));
/* It is quite probably that the device is new formatted. */
dev->od_maybe_new = 1;
* has no OI mapping, and only is visible inside the OSD.*/
lu_igif_build(fid, inode->i_ino, inode->i_generation);
rc = osd_ea_fid_set(info, inode, fid,
- LMAC_NOT_IN_OI | LMAC_FID_ON_OST, 0);
+ LMAC_NOT_IN_OI | LMAC_FID_ON_OST, 0);
+ if (rc)
+ GOTO(cleanup_dentry, rc);
- GOTO(cleanup, rc);
+ pop_ctxt(&save, &new);
+ RETURN(0);
-cleanup:
+cleanup_dentry:
+ dput(d);
+cleanup_ctxt:
pop_ctxt(&save, &new);
- if (IS_ERR(d)) {
- OBD_FREE_PTR(dev->od_ost_map);
- RETURN(PTR_ERR(d));
- }
+cleanup_alloc:
+ OBD_FREE_PTR(dev->od_ost_map);
return rc;
}
}
run_test 84 "check recovery_hard_time"
+test_85() {
+ [[ $(lustre_version_code ost1) -ge $(version_code 2.7.55) ]] ||
+ { skip "Need OST version at least 2.7.55" && return 0; }
+##define OBD_FAIL_OSD_OST_EA_FID_SET 0x197
+ do_facet ost1 "lctl set_param fail_loc=0x197"
+ start_ost
+ stop_ost
+}
+run_test 85 "osd_ost init: fail ea_fid_set"
+
if ! combined_mgs_mds ; then
stop mgs
fi