What triggers the recall of an offline file?

Hierarchical storage management is one of the taxes software developers have to pay. What can you safely do to an offline file? What will trigger its recall?

(First, a note on terminology: Recalling a file means to restore it from remote storage to local storage. A file that has been recalled is online; a file that has been placed on remote storage is offline.)

Merely opening the file will not recall it. Therefore, you can still open the file and use the handle in functions like GetFileInformationByHandle, GetFileTime, and GetFileSecurity without triggering a recall. But if you read from or write to the file (or map the file, which is the moral equivalent of reading and writing), then the file will be recalled from storage.

What about the FILE_FLAG_OPEN_NO_RECALL flag? This flag doesn't affect when the remote storage is accessed. (It's still read/write/map.) What it does is tell the hierarchical storage manager to leave the file offline. In other words, if you open an offline file with the FILE_FLAG_OPEN_NO_RECALL flag, then when you read from the file, the file contents will be read from tape directly and the file will remain in its offline state.

I'm told that the FILE_FLAG_OPEN_NO_RECALL flag is intended for backup programs so that they can back up all your files (even the offline ones) while still keeping them offline.

(Note: Do not confuse these types of offline files with another feature also confusingly called offline files. This is what happens when you let the Marketing department choose the names of your features.)

Comments (4)
  1. Frankly, I find the IE offline files name more intuitive than this one :-)

  2. dave says:

    The hierarchical store definition of ‘offline file’ has plenty of historical precedent.

    A large-machine OS I used in the early 1970s used to migrate files offline when the discs became full.

    In fact, that must be the original meaning of ‘offline’ – not immediately accessible to the program.

  3. Christian says:

    I wonder if anybody ever used this HSM-technology in Windows. Does it still exist in Vista?

    My company was very interessted in this techology, but for optical drives (jukeboxes). A jukebox costs 20000 EUR or so and what is really bad is that software to make a "drive letter" out of the whole jukebox costs the same.

    Microsoft seemed to only intended this HSM-technology to be used with tapes, not with optical memory. It’s so sad the the XP-CD-burning engine could not be used for that.

    Anyway, today harddrives are sooo cheap that nobody needs tape-drives anyway

  4. steveg says:

    I can’t begin to imagine the number of test cases that have to exist around file i/o…

    Presumably there’s no harm (as in OMG Where’s My Data Gone!) using FILE_FLAG_OPEN_NO_RECALL on a file on a local harddrive. Performance would be worse (how much caching does the flag bypass?).

    Marketing, love ’em or hate ’em they generally throw good parties.

Comments are closed.

Skip to main content