Closed
Bug 541660
Opened 15 years ago
Closed 15 years ago
test_largeOfflineStore.js: Detect and exit early with non-NTFS volumes, and otherwise mark the inbox file as sparse on Windows
Categories
(MailNews Core :: Testing Infrastructure, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.1b1
People
(Reporter: rain1, Assigned: rain1)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
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 [1], 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.
[1] http://stackoverflow.com/questions/186077/how-do-i-create-a-sparse-file-programmatically-in-c-on-mac-os-x
[2] http://www.win.tue.nl/~aeb/linux/lk/lk-6.html#ss6.2
Attachment #423138 -
Flags: review?(bugzilla)
Assignee | ||
Comment 1•15 years ago
|
||
MSDN docs for sparse file operations: <http://msdn.microsoft.com/en-us/library/aa365566(VS.85).aspx>
Assignee | ||
Comment 2•15 years ago
|
||
Removed a dump statement and tweaked the position of an opening brace.
Attachment #423138 -
Attachment is obsolete: true
Attachment #423139 -
Flags: review?(bugzilla)
Attachment #423138 -
Flags: review?(bugzilla)
Comment 3•15 years ago
|
||
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.
Assignee | ||
Comment 4•15 years ago
|
||
Yeah, I think I should have done that in the first place.
Attachment #423139 -
Attachment is obsolete: true
Attachment #423148 -
Flags: review?(bugzilla)
Attachment #423139 -
Flags: review?(bugzilla)
Assignee | ||
Comment 5•15 years ago
|
||
Hm, I guess this'll need an ifdef ENABLE_TESTS around it in the makefile?
Comment 6•15 years ago
|
||
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+
Assignee | ||
Comment 7•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 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.
Description
•