Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
3
-
9223372036854775807
Description
During code analysis I found that LU-6401 brakes ENOSPC handling logic in OSP.
osp_precreate_send() returns -ESTALE when OST can't precreate objects i.e. -ENOSPACE:
if (osp_fid_diff(fid, &d->opd_pre_used_fid) <= 0) { CERROR("%s: precreate fid "DFID" < local used fid "DFID": rc = %d\n", d->opd_obd->obd_name, PFID(fid), PFID(&d->opd_pre_used_fid), -ESTALE); GOTO(out_req, rc = -ESTALE); }
However it is not correct. In case of -ENOSPC on OST, MDS should get -ENOSPC.
For example osp_precreat_reserve() forces local commit to release space and waits for OBD_TIMEOUT.
I think "LU-6401 uapi: fix up lustre_ostid.h and lustre_fid.h" broke this logic:
@@ -1781,7 +1781,7 @@ static int ofd_create_hdl(struct tgt_session_info *tsi) granted = 0; } - ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq)); + rc = ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq)); } EXIT;
After the patch OST returns 0 in case when osp_precreate_objects() returns -ENOSPC.
Attachments
Issue Links
- is duplicated by
-
LU-11588 ofd_create_hdl() shouldn't overwrite error code
-
- Resolved
-
Activity
Link | New: This issue is related to LCZ-7 [ LCZ-7 ] |
Labels | Original: LTS |
Fix Version/s | New: Lustre 2.10.7 [ 14401 ] |
Link | New: This issue is related to JFC-17 [ JFC-17 ] |
Link | New: This issue is duplicated by CAM-72 [ CAM-72 ] |
Fix Version/s | New: Lustre 2.12.0 [ 13495 ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Labels | New: LTS |
Description |
Original:
During code analysis I found that osp_precreate_send returns ESTALE when OST can't precreate objects i.e. ENOSPACE: {noformat} if (osp_fid_diff(fid, &d->opd_pre_used_fid) <= 0) { CERROR("%s: precreate fid "DFID" < local used fid "DFID ": rc = %d\n", d->opd_obd->obd_name, PFID(fid), PFID(&d->opd_pre_used_fid), -ESTALE); GOTO(out_req, rc = -ESTALE); } {noformat} However it is not correct. In case of ENOSPC on OST MDS should get ENOSPC. For example osp_precreat_reserve forces local commit to release space and waits for OBD_TIMEOUT. I think " {noformat} @@ -1781,7 +1781,7 @@ static int ofd_create_hdl(struct tgt_session_info *tsi) granted = 0; } - ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq)); + rc = ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq)); } EXIT;{noformat} After the patch OST returns 0 in case when osp_precreate_objects returns -28. |
New:
During code analysis I found that {{osp_precreate_send()}} returns {{-ESTALE}} when OST can't precreate objects i.e. {{-ENOSPACE}}: {noformat} if (osp_fid_diff(fid, &d->opd_pre_used_fid) <= 0) { CERROR("%s: precreate fid "DFID" < local used fid "DFID": rc = %d\n", d->opd_obd->obd_name, PFID(fid), PFID(&d->opd_pre_used_fid), -ESTALE); GOTO(out_req, rc = -ESTALE); } {noformat} However it is not correct. In case of {{-ENOSPC}} on OST, MDS should get {{-ENOSPC}}. For example {{osp_precreat_reserve()}} forces local commit to release space and waits for {{OBD_TIMEOUT}}. I think "{{ {noformat} @@ -1781,7 +1781,7 @@ static int ofd_create_hdl(struct tgt_session_info *tsi) granted = 0; } - ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq)); + rc = ostid_set_id(&rep_oa->o_oi, ofd_seq_last_oid(oseq)); } EXIT; {noformat} After the patch OST returns 0 in case when {{osp_precreate_objects()}} returns {{-ENOSPC}}. |
Assignee | Original: WC Triage [ wc-triage ] | New: Sergey Cheremencev [ scherementsev ] |