From ebe6c4a8ab3e82d75b4f3a18483ab4a9bcf0c025 Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 23 Sep 2013 14:20:05 +0100 Subject: [PATCH] mirror: Remove dead code. We still rely on all_dirty in one place. --- src/mirror.c | 5 ----- src/mirror.h | 12 +----------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/mirror.c b/src/mirror.c index 398b27a..4a64bc9 100644 --- a/src/mirror.c +++ b/src/mirror.c @@ -168,10 +168,6 @@ void mirror_reset( struct mirror * mirror ) mirror_set_state( mirror, MS_INIT ); mirror->all_dirty = 0; - mirror->all_clean = 0; - mirror->pass = 0; - mirror->this_pass_dirty = 0; - mirror->this_pass_clean = 0; mirror->migration_started = 0; mirror->offset = 0; @@ -588,7 +584,6 @@ static void mirror_read_cb( struct ev_loop *loop, ev_io *w, int revents ) /* transfer was completed, so now we need to either set up the next * transfer of this pass, set up the first transfer of the next pass, or * complete the migration */ - m->this_pass_dirty += xfer->len; m->all_dirty += xfer->len; xfer->read = 0; xfer->written = 0; diff --git a/src/mirror.h b/src/mirror.h index 4fb14e3..cc43b22 100644 --- a/src/mirror.h +++ b/src/mirror.h @@ -93,18 +93,8 @@ struct mirror { * used to calculate bps, etc. */ uint64_t migration_started; - - /* The current mirror pass. We put this here so status can query it. FIXME: remove */ - int pass; - - /* Number of dirty and clean bytes for the entire migration. FIXME: Remove */ + /* Running count of all bytes we've transferred */ uint64_t all_dirty; - uint64_t all_clean; - - /* The number of dirty (had to send to dest) and clean (could skip) bytes - * for this pass. FIXME: No longer used, so need removing */ - uint64_t this_pass_dirty; - uint64_t this_pass_clean; };