Closed Bug 541660 Opened 11 years ago Closed 11 years ago
_large Offline Store .js: Detect and exit early with non-NTFS volumes, and otherwise mark the inbox file as sparse on Windows
FAT32 doesn't work with files above 4 GB, so we need to detect early and exit there. Also, given that almost the entire file is empty, it seems like a waste to allocate space for it, so mark the file as sparse and the first 4 GB + change as a sparse region. This doesn't need to be done on Linux, as the file system doesn't allocate space for untouched areas [1, 2]. On OS X, HFS+ doesn't support sparse files , so we still check for free space there -- apparently UFS does support sparse files, but I don't have OS X so I can't write a native code helper.  http://stackoverflow.com/questions/186077/how-do-i-create-a-sparse-file-programmatically-in-c-on-mac-os-x  http://www.win.tue.nl/~aeb/linux/lk/lk-6.html#ss6.2
MSDN docs for sparse file operations: <http://msdn.microsoft.com/en-us/library/aa365566(VS.85).aspx>
Removed a dump statement and tweaked the position of an opening brace.
We're eventually going to want something similar when we allow pop mailboxes > 4GB, so some or all of this might want to be in a shared place.
Yeah, I think I should have done that in the first place.
Hm, I guess this'll need an ifdef ENABLE_TESTS around it in the makefile?
Comment on attachment 423148 [details] [diff] [review] patch, v2 >@@ -51,16 +51,17 @@ PARALLEL_DIRS += \ ... >+ test \ This should be in a separate ifdef ENABLE_TESTS check. >+ // XXX This needs to be fixed to use runw once it lands >+ helperProc.run(true, args, args.length); Nit: please include the bug number for this.
Attachment #423148 - Flags: review?(bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b1
You need to log in before you can comment on or make changes to this bug.