MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / MVOL_skip_block

Function MVOL_skip_block

src/burp/mvol.cpp:1007–1029  ·  view source on GitHub ↗

____________________________________________________________ Skip head in the IO buffer. Often used when only doing partial restores.

Source from the content-addressed store, hash-verified

1005// doing partial restores.
1006//
1007void MVOL_skip_block( BurpGlobals* tdgbl, ULONG count)
1008{
1009 // To handle tape drives & Multi-volume boundaries, use the normal
1010 // read function, instead of doing a more optimal seek.
1011
1012
1013 while (count)
1014 {
1015 // If buffer empty, reload it
1016 if (tdgbl->gbl_io_cnt <= 0)
1017 {
1018 MVOL_read(tdgbl);
1019 }
1020
1021 const ULONG n = MIN(count, (ULONG) tdgbl->gbl_io_cnt);
1022
1023 // Skip ahead in current buffer
1024
1025 count -= n;
1026 tdgbl->gbl_io_cnt -= n;
1027 tdgbl->gbl_io_ptr += n;
1028 }
1029}
1030
1031
1032#ifdef WIN_NT

Callers

nothing calls this directly

Calls 1

MVOL_readFunction · 0.85

Tested by

no test coverage detected