What triggers the recall of an offline file?

Date:January 9, 2007 / year-entry #7
Tags:code
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20070109-00/?p=28483
Comments:    4
Summary: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...

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.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index