I am developing FPOLICY server for Clustered ONTAP NetApp 8.3. I am using Data ONTAP Simulator. We are using 133 bytes long shortcut files (offline).
When I opened shortcut - offline file (for example archived text file) in notepad I will get event to my FPolicy server, I copy original file to shortcut path (replace shortcut with original content), remove offline attribute and after this I will send reply ALLOW (File notification response) to Clustered-ONTAP. After this is content displayed in notepad and I see only 133 bytes of original content.
But, in this time is file size 9KB. I can see file size in opened network share over CIFS in Windows Explorer. I closed the notepad. When I wait some time (maybe 1 minute without any file operations) and I open file again (is without offline attribute and file size 9KB) than I can see full content in notepad.
I don't know why I don't see the full content of original file however the file content si restored, offline file attribute is removed and ALLOW notification response was sent.
I try one test where I create shortcut file with file size of original file (9KB with white spaces) and after I open this offline file (doubleclick on file at share, replacing content, removing offline attr., ALLOW sent) I can see full content of original file. Maybe there is some delay with refreshing file size of files internally in Clustered-ONTAP storage. Is this behavior the same with physical NETAPP storage?
So I think that SPARSE (size faking) may help. I want to try to use sparse attribute but I got: FSCTL_SET_SPARSE OK, FSCTL_SET_ZERO_DATA ERROR: Incorrect function. (0x00000001).