[LU-8645] Update imp_known_replied_xid for resend-replay Created: 28/Sep/16 Updated: 28/Jan/17 Resolved: 20/Oct/16 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0, Lustre 2.9.0 |
| Fix Version/s: | Lustre 2.9.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Niu Yawei (Inactive) | Assignee: | Niu Yawei (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
The imp_known_replied_xid is updated each time when we try to get the known replied xid by following function: __u64 ptlrpc_known_replied_xid(struct obd_import *imp)
{
struct ptlrpc_request *req;
assert_spin_locked(&imp->imp_lock);
if (list_empty(&imp->imp_unreplied_list))
return 0;
req = list_entry(imp->imp_unreplied_list.next, struct ptlrpc_request,
rq_unreplied_list);
LASSERTF(req->rq_xid >= 1, "XID:%llu\n", req->rq_xid);
if (imp->imp_known_replied_xid < req->rq_xid - 1)
imp->imp_known_replied_xid = req->rq_xid - 1;
return req->rq_xid - 1;
}
Usually, the imp_known_replied_xid should be less than or equal to the miminal xid in unreplied list, one exception is resend-repaly request, on reconnection during recovery, we may resend an already replied replay request by re-adding it to unreplied list. The above function needs be amended to handle this case. |
| Comments |
| Comment by Niu Yawei (Inactive) [ 28/Sep/16 ] |
|
Actually, we'd better keep the ptlrpc_known_replied_xid() untouched but change the replay code to handle this exception. |
| Comment by Gerrit Updater [ 28/Sep/16 ] |
|
Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/22776 |
| Comment by Gerrit Updater [ 20/Oct/16 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22776/ |
| Comment by Peter Jones [ 20/Oct/16 ] |
|
Landed for 2.9 |