diff options
| author | Jan Kryl <jan.kryl@nexenta.com> | 2014-04-14 11:50:59 -0400 |
|---|---|---|
| committer | Albert Lee <trisk@nexenta.com> | 2014-04-14 15:31:57 -0400 |
| commit | f5b1cef2488dc579cb4312d49164f10debf8e97d (patch) | |
| tree | b364275d7afb72c40df1283b918a23697e39ab3a /usr/src/cmd/ndmpd | |
| parent | 0b5ce10aee80822ecc7df77df92a5e24078ba196 (diff) | |
| download | illumos-joyent-f5b1cef2488dc579cb4312d49164f10debf8e97d.tar.gz | |
4738 tape block number is set at wrong place
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/cmd/ndmpd')
| -rw-r--r-- | usr/src/cmd/ndmpd/ndmp/ndmpd_mover.c | 2 | ||||
| -rw-r--r-- | usr/src/cmd/ndmpd/ndmp/ndmpd_util.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/usr/src/cmd/ndmpd/ndmp/ndmpd_mover.c b/usr/src/cmd/ndmpd/ndmp/ndmpd_mover.c index e8d84b6d93..2f7f311e75 100644 --- a/usr/src/cmd/ndmpd/ndmp/ndmpd_mover.c +++ b/usr/src/cmd/ndmpd/ndmp/ndmpd_mover.c @@ -763,6 +763,8 @@ ndmpd_mover_continue_v3(ndmp_connection_t *connection, void *body) (void) mutex_lock(&nlp->nlp_mtx); session->ns_mover.md_state = NDMP_MOVER_STATE_ACTIVE; session->ns_mover.md_pause_reason = NDMP_MOVER_PAUSE_NA; + /* The tape has been likely exchanged, reset tape block counter */ + session->ns_tape.td_record_count = 0; (void) cond_broadcast(&nlp->nlp_cv); (void) mutex_unlock(&nlp->nlp_mtx); diff --git a/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c b/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c index c053e7cb9d..880cef53ee 100644 --- a/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c +++ b/usr/src/cmd/ndmpd/ndmp/ndmpd_util.c @@ -1134,12 +1134,8 @@ ndmp_wait_for_mover(ndmpd_session_t *session) } (void) mutex_unlock(&nlp->nlp_mtx); - if (session->ns_mover.md_state == NDMP_MOVER_STATE_ACTIVE) { - session->ns_tape.td_record_count = 0; - return (0); - } - - return (-1); + return ((session->ns_mover.md_state == NDMP_MOVER_STATE_ACTIVE) ? + 0 : -1); } /* |
