"Flushing" a rename?
"Flushing" a rename?
- Subject: "Flushing" a rename?
- From: James Bucanek <email@hidden>
- Date: Tue, 13 May 2008 15:36:21 -0700
Greetings,
I'm working on a data recovery scheme that needs to be sure that
the previous set of file changes have been completely
committed/written to disk before the next update phase begins.
The idea is that if the next data update fails/crashes/whatever,
that the data files can be "rolled back" to their previous state
and life can go on as normal.
I know that flushing an open file fork (FSFlushFork) guarantees
that all of the file data, and all directory records associated
with that file, have all been written to disk before the call returns.
But I now have a second file that gets updated by writing the
data a temporary file which replaces the original file via a
rename. After the rename, how can I guarantee that all of the
directory records associated with that file have been flushed to disk?
Would it be sufficient to reopen the file, flush it, and close
it again? I'm making the assumption that I should avoid flushing
the whole volume (FSFlushVolume). But I could, if that's the
simplest solution. Note that this isn't something that needs to
happen very often (a few times a day).
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden