From e47737e2a8eb0e3f321c0c4ff39255c8f60f82d2 Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Thu, 29 Sep 2011 18:59:03 +0000 Subject: Disk Cache: Improve handling of dirty entries. * Split the entry sanity checks in two parts: a critical one and a non-critical one. This allows us to return dirty entries instead of failing to open them. * Make sure that we cannot reach an entry through the index before the actual data reaches the disk (when creating an entry linked through a parent we were not respecting that). * When deleting a block from a block file, first clean it up and then update the map (avoid leaving a dirty free block if there is a crash) * Handle the case of errors when opening entries through the enumerations path. BUG=73102 TEST=net_unittests Review URL: http://codereview.chromium.org/8065015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103323 0039d316-1c4b-4281-b951-d872f2087c98 --- net/disk_cache/entry_impl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'net/disk_cache/entry_impl.h') diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h index d82c74d..c0fb5e1 100644 --- a/net/disk_cache/entry_impl.h +++ b/net/disk_cache/entry_impl.h @@ -104,8 +104,16 @@ class NET_EXPORT_PRIVATE EntryImpl // Fixes this entry so it can be treated as valid (to delete it). void SetPointerForInvalidEntry(int32 new_id); + // Returns true if this entry is so meesed up that not everything is going to + // be removed. + bool LeaveRankingsBehind(); + // Returns false if the entry is clearly invalid. bool SanityCheck(); + bool DataSanityCheck(); + + // Attempts to make this entry reachable though the key. + void FixForDelete(); // Handle the pending asynchronous IO count. void IncrementIoCount(); -- cgit v1.1