Print this page
4738 tape block number is set at wrong place
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>


 746                             session->ns_mover.md_sock, NDMPD_SELECT_MODE_WRITE,
 747                             HC_MOVER, mover_data_write_v3) < 0)
 748                                 ndmpd_mover_error(session,
 749                                     NDMP_MOVER_HALT_INTERNAL_ERROR);
 750                 } else {
 751                         /*
 752                          * This should not happen because we should be in the
 753                          * right window. This means that DMA does not follow
 754                          * the V3 spec.
 755                          */
 756                         NDMP_LOG(LOG_DEBUG, "DMA Error.");
 757                         ndmpd_mover_error(session,
 758                             NDMP_MOVER_HALT_INTERNAL_ERROR);
 759                         return;
 760                 }
 761         }
 762 
 763         (void) mutex_lock(&nlp->nlp_mtx);
 764         session->ns_mover.md_state = NDMP_MOVER_STATE_ACTIVE;
 765         session->ns_mover.md_pause_reason = NDMP_MOVER_PAUSE_NA;


 766         (void) cond_broadcast(&nlp->nlp_cv);
 767         (void) mutex_unlock(&nlp->nlp_mtx);
 768 
 769         reply.error = NDMP_NO_ERR;
 770         ndmp_send_reply(connection, (void *) &reply,
 771             "sending mover_continue reply");
 772 }
 773 
 774 
 775 /*
 776  * ndmpd_mover_abort_v3
 777  *
 778  * This handler handles mover_abort requests.
 779  *
 780  * Parameters:
 781  *   connection (input) - connection handle.
 782  *   body       (input) - request message body.
 783  *
 784  * Returns:
 785  *   void




 746                             session->ns_mover.md_sock, NDMPD_SELECT_MODE_WRITE,
 747                             HC_MOVER, mover_data_write_v3) < 0)
 748                                 ndmpd_mover_error(session,
 749                                     NDMP_MOVER_HALT_INTERNAL_ERROR);
 750                 } else {
 751                         /*
 752                          * This should not happen because we should be in the
 753                          * right window. This means that DMA does not follow
 754                          * the V3 spec.
 755                          */
 756                         NDMP_LOG(LOG_DEBUG, "DMA Error.");
 757                         ndmpd_mover_error(session,
 758                             NDMP_MOVER_HALT_INTERNAL_ERROR);
 759                         return;
 760                 }
 761         }
 762 
 763         (void) mutex_lock(&nlp->nlp_mtx);
 764         session->ns_mover.md_state = NDMP_MOVER_STATE_ACTIVE;
 765         session->ns_mover.md_pause_reason = NDMP_MOVER_PAUSE_NA;
 766         /* The tape has been likely exchanged, reset tape block counter */
 767         session->ns_tape.td_record_count = 0;
 768         (void) cond_broadcast(&nlp->nlp_cv);
 769         (void) mutex_unlock(&nlp->nlp_mtx);
 770 
 771         reply.error = NDMP_NO_ERR;
 772         ndmp_send_reply(connection, (void *) &reply,
 773             "sending mover_continue reply");
 774 }
 775 
 776 
 777 /*
 778  * ndmpd_mover_abort_v3
 779  *
 780  * This handler handles mover_abort requests.
 781  *
 782  * Parameters:
 783  *   connection (input) - connection handle.
 784  *   body       (input) - request message body.
 785  *
 786  * Returns:
 787  *   void