search for: start_of

Displaying 19 results from an estimated 19 matches for "start_of".

Did you mean: start_off
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...ghput.] --- rsync-2.4.6/util.c.rik Tue Sep 5 22:46:43 2000 +++ rsync-2.4.6/util.c Fri Oct 5 09:19:35 2001 @@ -835,28 +835,70 @@ return (int)*s1 - (int)*s2; } -static OFF_T last_ofs; +static OFF_T last_ofs; +static struct timeval print_time; +static struct timeval start_time; +static OFF_T start_ofs; + +static unsigned long msdiff(struct timeval *t1, struct timeval *t2) +{ + return (t2->tv_sec - t1->tv_sec) * 1000 + + (t2->tv_usec - t1->tv_usec) / 1000; +} + +static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now) +{ + int pct = (int)((100.0...
2004 Feb 27
2
patch: better progress meter
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20040227/923b87ee/PGP.bin
2004 Jan 13
3
Progress reporting: N more to check
...ic unsigned long msdiff(struct timev static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, int is_last) { + char eol[256]; int pct = (ofs == size) ? 100 : (int)((100.0*ofs)/size); unsigned long diff = msdiff(&start_time, now); double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0; @@ -72,10 +74,16 @@ static void rprint_progress(OFF_T ofs, O remain_m = (int) (remain / 60.0) % 60; remain_h = (int) (remain / 3600.0); + if (is_last) { + int todo = stats.num_files - stats.num_untransferred_files + - stats.num_transferred_files; + snprint...
2002 Apr 20
0
14676 100% 0.00kB/s 0:00:00
...!am_server && ofs > last_ofs + 1000)){ gettimeofday(&now, NULL); if (!start_time.tv_sec && !start_time.tv_usec) { start_time.tv_sec = now.tv_sec; start_time.tv_usec = now.tv_usec; start_ofs = ofs; } if((msdiff(&print_time, &now) > 250){ rprint_progress(ofs, size, &now, False); last_ofs = ofs; print_time.tv_sec = now.tv_sec; print_time.tv_usec = now.tv_usec; }...
2002 Mar 14
2
PATCH: better progress reporting
...le: /cvsroot/rsync/util.c,v retrieving revision 1.107 diff -u -w -r1.107 util.c --- util.c 23 Feb 2002 00:05:06 -0000 1.107 +++ util.c 14 Mar 2002 09:27:16 -0000 @@ -866,7 +866,9 @@ unsigned long diff = msdiff(&start_time, now); double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0; const char *units; - double remain = rate ? (double) (size-ofs) / rate / 1000.0: 0.0; + double remain = is_last + ? (double) diff / 1000.0 + : rate ? (double) (size-ofs) / rate / 1000.0 : 0.0;...
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
...set %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 8115eb2..d1e4fd8 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -898,22 +898,22 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
...set %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 8115eb2..d1e4fd8 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -898,22 +898,22 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 99334ac..f99f347 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1103,23 +1103,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 99334ac..f99f347 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1103,23 +1103,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 99334ac..f99f347 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1103,23 +1103,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a8f4fe2..3241d5e 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1109,23 +1109,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a8f4fe2..3241d5e 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1109,23 +1109,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a8f4fe2..3241d5e 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1109,23 +1109,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Jun 09
0
[PATCH 06/26] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index ce7b1aa..2a27dca 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1108,22 +1108,22 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Jun 09
0
[PATCH 06/26] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index ce7b1aa..2a27dca 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1108,22 +1108,22 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Jun 09
0
[PATCH 06/26] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index ce7b1aa..2a27dca 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1108,22 +1108,22 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a8f4fe2..20e8ab3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1109,23 +1109,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a8f4fe2..20e8ab3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1109,23 +1109,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
...t %llu\n", op, len, offset); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a8f4fe2..20e8ab3 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1109,23 +1109,23 @@ static void bio_chain_put(struct bio *chain) */ static void zero_bio_chain(struct bio *chain, int start_ofs) { - struct bio_vec *bv; + struct bio_vec bv; + struct bvec_iter iter; unsigned long flags; void *buf; - int i; int pos = 0; while (chain) { - bio_for_each_segment(bv, chain, i) { - if (pos + bv->bv_len > start_ofs) { + bio_for_each_segment(bv, chain, iter) { + if (pos + bv....