File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -566,6 +566,11 @@ impl WasiFs {
566
566
}
567
567
}
568
568
569
+ pub fn clear_free_fd_list ( & self ) {
570
+ let mut freed_fds = self . freed_fds . write ( ) . unwrap ( ) ;
571
+ freed_fds. clear ( ) ;
572
+ }
573
+
569
574
/// Closes all the file handles.
570
575
#[ allow( clippy:: await_holding_lock) ]
571
576
pub async fn close_all ( & self ) {
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ pub unsafe fn restore_snapshot(
62
62
. map_err ( anyhow_err_to_runtime_err) ?;
63
63
}
64
64
65
+ // Reset the freed FD's so that none of them will be reused after
66
+ // the journal resumes
67
+ runner. ctx . data ( ) . state ( ) . fs . clear_free_fd_list ( ) ;
68
+
65
69
// Once we get to this point we are no longer replaying the journal
66
70
// and need to clear this flag, the reason is that restoring the
67
71
// background threads may immediately process requests while this
You can’t perform that action at this time.
0 commit comments