• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
"Flushing" a rename?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"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


  • Follow-Ups:
    • Re: "Flushing" a rename?
      • From: Jens Alfke <email@hidden>
    • Re: "Flushing" a rename?
      • From: Dominic Giampaolo <email@hidden>
  • Prev by Date: Meaning of "locked" in Disk Utility
  • Next by Date: Re: "Flushing" a rename?
  • Previous by thread: Re: Meaning of "locked" in Disk Utility
  • Next by thread: Re: "Flushing" a rename?
  • Index(es):
    • Date
    • Thread