Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Issue 6292011: Disk cache: Prevent obscure file corruption and deal... (Closed)

Created:
9 years, 11 months ago by rvargas (doing something else)
Modified:
9 years, 6 months ago
Reviewers:
gavinp
CC:
chromium-reviews, pam+watch_chromium.org, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Disk cache: Prevent obscure file corruption and deal with the result of that corruption. 1. Now we mark any open entry as dirty, even if we are supposed to delete the entry right away because if we crash before that, we may end up clearing the dirty flag of a dirty entry. 2. When we look for a parent of a given entry we now double check that the entry is the one that we want (and not just another entry with the same key). 3. If we have a loop on the hash collision list (result of failing to do 1 and 2 above), we figure that out. 4. Now every time we open an entry from an LRU list we end up using the same code path (with the proper handling of dirty entries). BUG=69135 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72563

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -49 lines) Patch
M net/disk_cache/backend_impl.h View 3 chunks +17 lines, -5 lines 0 comments Download
M net/disk_cache/backend_impl.cc View 13 chunks +52 lines, -13 lines 2 comments Download
M net/disk_cache/backend_unittest.cc View 2 chunks +90 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.h View 1 chunk +8 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 1 chunk +29 lines, -0 lines 0 comments Download
M net/disk_cache/entry_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M net/disk_cache/eviction.h View 2 chunks +5 lines, -0 lines 0 comments Download
M net/disk_cache/eviction.cc View 9 chunks +27 lines, -15 lines 1 comment Download
M net/tools/dump_cache/dump_files.cc View 6 chunks +26 lines, -16 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
rvargas (doing something else)
9 years, 11 months ago (2011-01-21 02:27:06 UTC) #1
gavinp
I think we might want to think about splitting up MatchEntry. Otherwise, awesome fix! http://codereview.chromium.org/6292011/diff/1/net/disk_cache/backend_impl.cc ...
9 years, 11 months ago (2011-01-25 20:23:51 UTC) #2
rvargas (doing something else)
http://codereview.chromium.org/6292011/diff/1/net/disk_cache/backend_impl.cc File net/disk_cache/backend_impl.cc (right): http://codereview.chromium.org/6292011/diff/1/net/disk_cache/backend_impl.cc#newcode1572 net/disk_cache/backend_impl.cc:1572: bool* match_error) { Yeah, I thought about that too. ...
9 years, 11 months ago (2011-01-25 20:47:53 UTC) #3
gavinp
9 years, 11 months ago (2011-01-25 20:54:01 UTC) #4
Ricardo,

Go ahead an leave that change for another issue, we shouldn't delay this bug fix
going in.

This is LGTM provided you create that issue and assign it to yourself.  Thanks!

Powered by Google App Engine
This is Rietveld 408576698