Re: Transactions with files?
From: Toni (toni_at_toni.to)
Date: 20 Jul 2005 12:35:20 -0700
This is not a school assignment, I need that at work.
I'm familiar with the way databases do transactions (transaction logs),
that's not what I'm looking for.
I'd like to map a copy of the file into the virtual memory (mmap() with
MAP_PRIVATE), write to the copy of the file and eventually - on commit
- write that copy back to the original file.
Since all readers also map the file using mmap(), the pager would
re-read mapped memory pages that have been changed.
I just can't find a way to write the mapped copy of the file back to
the original file...
Any other solution would also be greatly appreciated :)