If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

DeviceStorage: Invalidate used space cache if free space changes

RESOLVED FIXED in Firefox 24, Firefox OS v1.1hd

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dhylands, Assigned: dhylands)

Tracking

(Blocks: 1 bug)

unspecified
mozilla24
ARM
Gonk (Firefox OS)
Points:
---
Bug Flags:
in-moztrap -

Firefox Tracking Flags

(blocking-b2g:leo+, firefox22 wontfix, firefox23 wontfix, firefox24 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

Details

(Whiteboard: [fixed-in-birch][mozilla-triage])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
A used space cache was added to reduce the time it takes to calculate the amount of space used by the various file types.

However, if files are added/removed from the filesystem without going through device storage, then it won't know to invalidate the used space cache.

One fairly simple, and efficient way to cover this case is to invalidate the cache if the amount of free space changes (this implies that the used space also changed somehow).
(Assignee)

Comment 1

4 years ago
Created attachment 757183 [details] [diff] [review]
invalidate used space cache if the free space changes.

This patch caused the used space cache retrieval to fail if the used space changes.
I also noticed that the GetUsedSizeForType function was no longer referenced anywhere, so I removed it.
(Assignee)

Comment 2

4 years ago
Created attachment 757366 [details] [diff] [review]
invalidate used space cache if the free space changes. v2
(Assignee)

Updated

4 years ago
Attachment #757183 - Attachment is obsolete: true
(Assignee)

Comment 3

4 years ago
Comment on attachment 757366 [details] [diff] [review]
invalidate used space cache if the free space changes. v2

Review of attachment 757366 [details] [diff] [review]:
-----------------------------------------------------------------

I thought I'd send this your way. If you're too busy or don't feel comfortable reviewing, please let me know and I'll find somebody else.
Attachment #757366 - Flags: review?(Jan.Varga)

Comment 4

4 years ago
Comment on attachment 757366 [details] [diff] [review]
invalidate used space cache if the free space changes. v2

Review of attachment 757366 [details] [diff] [review]:
-----------------------------------------------------------------

looks good
Attachment #757366 - Flags: review?(Jan.Varga) → review+
(Assignee)

Comment 5

4 years ago
https://hg.mozilla.org/projects/birch/rev/b39f3b7995aa
Whiteboard: [fixed-in-birch]
https://hg.mozilla.org/mozilla-central/rev/b39f3b7995aa
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24

Comment 7

4 years ago
https://bugzilla.mozilla.org/show_bug.cgi?id=876560#c7
Whiteboard: [fixed-in-birch] → [fixed-in-birch][mozilla-triage]
blocking-b2g: leo? → leo+
https://hg.mozilla.org/releases/mozilla-b2g18/rev/bc472d357309
status-b2g18: --- → fixed
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → wontfix
status-b2g-v1.1hd: --- → affected
status-firefox22: --- → wontfix
status-firefox23: --- → wontfix
status-firefox24: --- → fixed
https://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/bc472d357309
status-b2g-v1.1hd: affected → fixed

Updated

4 years ago
Flags: in-moztrap-
You need to log in before you can comment on or make changes to this bug.