Open tjhu opened 4 years ago
Fixed. You can now use fs::log::Transaction
to manage your transaction.
TODO: change it to a cleaner interface. For example, Transaction::get()
instead of LOG.r#try().unwrap().begin_transaction()
to acquire a transaction.
In xv6, syscalls manually do
begin_op()
andend_op()
to open and close transactions. This is unsafe and hard to port to Rust. Maybe wrap these two calls into a guard and use RAII to auto-close a transaction when the guard goes out of the scope. But we need to fully understand the logging layer and make sure that we are able to refactor every single call site.