version 1.21, 2021/11/03 14:42:12 |
version 1.22, 2024/02/27 11:28:30 |
|
|
blk->len, blk->idx); |
blk->len, blk->idx); |
tok = -(blk->idx + 1); |
tok = -(blk->idx + 1); |
|
|
|
hash_file_buf(&st->ctx, st->map + last, sz + blk->len); |
|
|
/* |
/* |
* Write the data we have, then follow it with |
* Write the data we have, then follow it with |
* the tag of the block that matches. |
* the tag of the block that matches. |
|
|
st->total += blk->len; |
st->total += blk->len; |
st->offs += blk->len; |
st->offs += blk->len; |
st->hint = blk->idx + 1; |
st->hint = blk->idx + 1; |
|
|
return; |
return; |
} |
} |
|
|
|
|
st->curlen = st->curpos + sz; |
st->curlen = st->curpos + sz; |
st->curtok = 0; |
st->curtok = 0; |
st->curst = sz ? BLKSTAT_DATA : BLKSTAT_TOK; |
st->curst = sz ? BLKSTAT_DATA : BLKSTAT_TOK; |
|
|
|
hash_file_buf(&st->ctx, st->map + st->curpos, sz); |
} else { |
} else { |
st->curpos = 0; |
st->curpos = 0; |
st->curlen = st->mapsz; |
st->curlen = st->mapsz; |
st->curtok = 0; |
st->curtok = 0; |
st->curst = st->mapsz ? BLKSTAT_DATA : BLKSTAT_TOK; |
st->curst = st->mapsz ? BLKSTAT_DATA : BLKSTAT_TOK; |
st->dirty = st->total = st->mapsz; |
st->dirty = st->total = st->mapsz; |
|
|
|
hash_file_buf(&st->ctx, st->map, st->mapsz); |
|
|
LOG4("%s: flushing whole file %zu B", |
LOG4("%s: flushing whole file %zu B", |
path, st->mapsz); |
path, st->mapsz); |