vere: make full replay (play -f) command bypass corruption

This commit is contained in:
Joe Bryan 2022-12-16 00:34:15 -05:00
parent f095679e02
commit 4d08d874c6
3 changed files with 49 additions and 33 deletions

View File

@ -1885,16 +1885,21 @@ _cw_play(c3_i argc, c3_c* argv[])
}
u3C.wag_w |= u3o_hashless;
u3m_boot(u3_Host.dir_c, (size_t)1 << u3_Host.ops_u.lom_y);
u3C.slog_f = _cw_play_slog;
if ( c3y == ful_o ) {
u3l_log("mars: preparing for full replay\r\n");
u3m_init((size_t)1 << u3_Host.ops_u.lom_y);
u3e_live(u3m_pier(u3_Host.dir_c));
u3e_yolo();
u3m_pave(c3y);
u3j_boot(c3y);
u3A->eve_d = 0;
}
else {
u3m_boot(u3_Host.dir_c, (size_t)1 << u3_Host.ops_u.lom_y);
}
u3C.slog_f = _cw_play_slog;
{
u3_mars mar_u = {

View File

@ -8,6 +8,11 @@
c3_d
u3m_boot(c3_c* dir_c, size_t len_i);
/* u3m_pier(): make a pier.
*/
c3_c*
u3m_pier(c3_c* dir_c);
/* u3m_boot_lite(): start without checkpointing.
*/
c3_d

View File

@ -1961,24 +1961,15 @@ u3m_stop()
c3_free(u3D.ray_u);
}
/* u3m_boot(): start the u3 system. return next event, starting from 1.
/* u3m_pier(): make a pier.
*/
c3_d
u3m_boot(c3_c* dir_c, size_t len_i)
c3_c*
u3m_pier(c3_c* dir_c)
{
c3_o nuu_o;
c3_c ful_c[8193];
u3C.dir_c = dir_c;
/* Activate the loom.
*/
u3m_init(len_i);
/* Activate the storage system.
*/
{
c3_c ful_c[8193];
snprintf(ful_c, 8192, "%s", dir_c);
if ( c3_mkdir(ful_c, 0700) ) {
if ( EEXIST != errno ) {
@ -2003,8 +1994,23 @@ u3m_boot(c3_c* dir_c, size_t len_i)
}
}
nuu_o = u3e_live(strdup(ful_c));
}
return strdup(ful_c);
}
/* u3m_boot(): start the u3 system. return next event, starting from 1.
*/
c3_d
u3m_boot(c3_c* dir_c, size_t len_i)
{
c3_o nuu_o;
/* Activate the loom.
*/
u3m_init(len_i);
/* Activate the storage system.
*/
nuu_o = u3e_live(u3m_pier(dir_c));
/* Activate tracing.
*/