Whamcloud - gitweb
LU-6837 update: re-lookup the dtrq in the replay list.
[fs/lustre-release.git] / lustre / target / update_recovery.c
index cad0183..3ec884d 100644 (file)
@@ -368,6 +368,7 @@ insert_update_records_to_replay_list(struct target_distribute_txn_data *tdtd,
               " mdt_index %u\n", tdtd->tdtd_lut->lut_obd->obd_name,
               record->ur_batchid, record->ur_master_transno, mdt_index);
 
+again:
        /* First try to build the replay update request with the records */
        spin_lock(&tdtd->tdtd_replay_list_lock);
        dtrq = dtrq_lookup(tdtd, record->ur_batchid);
@@ -391,7 +392,7 @@ insert_update_records_to_replay_list(struct target_distribute_txn_data *tdtd,
                if (rc == -EEXIST) {
                        /* Some one else already add the record */
                        dtrq_destroy(dtrq);
-                       rc = 0;
+                       goto again;
                }
        } else {
                struct update_records *dtrq_rec;