version 1.19, 2019/02/21 22:11:26 |
version 1.20, 2019/03/23 16:04:28 |
|
|
*/ |
*/ |
|
|
if (!sess->opts->dry_run) |
if (!sess->opts->dry_run) |
LOG3(sess, "%s: flushed %jd KB total, %.2f%% " |
LOG3(sess, "%s: flushed %jd KB total, %.2f%% uploaded", |
"uploaded", fl[up->cur->idx].path, |
fl[up->cur->idx].path, |
(intmax_t)up->stat.total / 1024, |
(intmax_t)up->stat.total / 1024, |
100.0 * up->stat.dirty / up->stat.total); |
100.0 * up->stat.dirty / up->stat.total); |
send_up_reset(up); |
send_up_reset(up); |
return 1; |
return 1; |
case BLKSTAT_PHASE: |
case BLKSTAT_PHASE: |
|
|
io_lowbuffer_buf(sess, *wb, &pos, *wbsz, buf, 20); |
io_lowbuffer_buf(sess, *wb, &pos, *wbsz, buf, 20); |
|
|
LOG3(sess, "%s: primed for %jd B total", |
LOG3(sess, "%s: primed for %jd B total", |
fl[up->cur->idx].path, |
fl[up->cur->idx].path, (intmax_t)up->cur->blks->size); |
(intmax_t)up->cur->blks->size); |
|
up->stat.curst = BLKSTAT_NEXT; |
up->stat.curst = BLKSTAT_NEXT; |
} |
} |
|
|
|
|
/* Validate the index. */ |
/* Validate the index. */ |
|
|
if (idx < 0 || (uint32_t)idx >= flsz) { |
if (idx < 0 || (uint32_t)idx >= flsz) { |
ERRX(sess, "file index out of bounds: invalid %" |
ERRX(sess, "file index out of bounds: invalid %d out of %zu", |
PRId32 " out of %zu", idx, flsz); |
idx, flsz); |
return 0; |
return 0; |
} else if (S_ISDIR(fl[idx].st.mode)) { |
} else if (S_ISDIR(fl[idx].st.mode)) { |
ERRX(sess, "blocks requested for " |
ERRX(sess, "blocks requested for " |