Closed Bug 795478 Opened 7 years ago Closed 7 years ago

DeviceStorage: freeBytes is a very large number when I use up all the space on /sdcard

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18
blocking-basecamp +

People

(Reporter: djf, Assigned: dougt)

Details

Attachments

(1 file)

If I fill up my sdcard by writing giant files with dd, device storage stat() reports some giant number of free bytes.  If I leave just a tiny bit of free space, stat() seems to report that correctly.

I'm guessing that since adb gives me root access, I'm able to actually use up reserved space on the partition and the OS is reporting negative free bytes, which are then getting converted to an giant unsigned value.

Here's an example giant value: 18446744073709548000  It equals -3616, I think

I don't want freeBytes to return a negative value.  It should clamp to 0, I think.
blocking-basecamp: --- → ?
Attached patch patch v.1Splinter Review
Attachment #666432 - Flags: review?
Doug, did you intentionally leave the requestee field blank?  Your patch is r? but no one is listed to do the review.
Attachment #666432 - Flags: review? → review?(benjamin)
blocking-basecamp: ? → +
Attachment #666432 - Flags: review?(benjamin) → review+
djf, i was looking for a reviewer last night.  I found bsmedberg. ;)


I'll check-in tonight.
https://hg.mozilla.org/mozilla-central/rev/ba388025ede9
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.