Whamcloud - gitweb
LU-5432 fld: don't loop forever on bogus FID sequences 05/11605/2
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 26 Aug 2014 16:28:30 +0000 (11:28 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 Oct 2014 00:50:09 +0000 (00:50 +0000)
In fld_client_rpc() if the FLD query RPC returns -ENOENT then break
the retry loop and return -ENOENT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id70a5d8f6c2105509149e72e8910fcb6c51732f0
Reviewed-on: http://review.whamcloud.com/11605
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/fld/fld_request.c

index 33c5f97..44d5cd0 100644 (file)
@@ -429,6 +429,12 @@ again:
        obd_get_request_slot(&exp->exp_obd->u.cli);
        rc = ptlrpc_queue_wait(req);
        obd_put_request_slot(&exp->exp_obd->u.cli);
        obd_get_request_slot(&exp->exp_obd->u.cli);
        rc = ptlrpc_queue_wait(req);
        obd_put_request_slot(&exp->exp_obd->u.cli);
+
+       if (rc == -ENOENT) {
+               /* Don't loop forever on non-existing FID sequences. */
+               GOTO(out_req, rc);
+       }
+
        if (rc != 0) {
                if (imp->imp_state != LUSTRE_IMP_CLOSED) {
                        /* Since LWP is not replayable, so it will keep
        if (rc != 0) {
                if (imp->imp_state != LUSTRE_IMP_CLOSED) {
                        /* Since LWP is not replayable, so it will keep