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

Issue 1918243004: Mark removable Drive caches for cryptohome. (Closed)

Created:
4 years, 8 months ago by oka
Modified:
4 years, 7 months ago
Reviewers:
hashimoto, yawano
CC:
chromium-reviews, oshima+watch_chromium.org, fukino, yawano
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mark removable Drive caches for cryptohome. Design doc: https://docs.google.com/document/d/1Kdq-b5kpudbotQ1q2GRNd52f-oZUrf7mfuZb1XUqH4U/edit#heading=h.sa3sh9r88p48 - Mark the Drive cache dir with +d (chattr) and user.GCacheFiles (setxattr), and mark removable files in it with +d. - Toggle the status of metadata if cache files have been removed by cryptohome. - Remove a file if it exsits but metadata says not (inconsistency possibly happens on abrupt shutdown). - Toggle +d as necessary when pinned/dirty status are changed. Committed: https://crrev.com/1d5bdf653f3859d29ae3b6ad7535cefc3702f45d Cr-Commit-Position: refs/heads/master@{#393229}

Patch Set 1 #

Patch Set 2 : Mark removable drive caches for cryptohome. #

Patch Set 3 : Add a test: MigrationHappensOnlyOnce #

Patch Set 4 : Nit #

Total comments: 52

Patch Set 5 : Resovle comments. #

Patch Set 6 : Nit #

Patch Set 7 : Nit #

Patch Set 8 : Nit #

Total comments: 14

Patch Set 9 : Resolve comments #

Patch Set 10 : Resolve comments. #

Patch Set 11 : Nit #

Total comments: 7

Patch Set 12 : Resolve comments. #

Patch Set 13 : Resolve comments. #

Total comments: 8

Patch Set 14 : Resolve comments. #

Patch Set 15 : Resolve comments. #

Patch Set 16 : Nit #

Patch Set 17 : Nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -166 lines) Patch
M components/drive/chromeos/file_cache.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -8 lines 0 comments Download
M components/drive/chromeos/file_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 chunks +155 lines, -37 lines 0 comments Download
M components/drive/chromeos/file_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +118 lines, -121 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (10 generated)
oka
PTAL
4 years, 7 months ago (2016-05-02 06:36:50 UTC) #5
hashimoto
https://codereview.chromium.org/1918243004/diff/60001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/60001/components/drive/chromeos/file_cache.cc#newcode55 components/drive/chromeos/file_cache.cc:55: // Set extended file attribute as |name| |value| pair. ...
4 years, 7 months ago (2016-05-02 08:29:21 UTC) #7
oka
PTAL https://codereview.chromium.org/1918243004/diff/60001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/60001/components/drive/chromeos/file_cache.cc#newcode55 components/drive/chromeos/file_cache.cc:55: // Set extended file attribute as |name| |value| ...
4 years, 7 months ago (2016-05-09 14:27:41 UTC) #8
hashimoto
https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc#newcode63 components/drive/chromeos/file_cache.cc:63: bool SetFileAttributes(const base::FilePath& path, int64_t flags) { Does this ...
4 years, 7 months ago (2016-05-10 10:33:49 UTC) #9
oka
PTAL. Thanks! https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc#newcode63 components/drive/chromeos/file_cache.cc:63: bool SetFileAttributes(const base::FilePath& path, int64_t flags) { ...
4 years, 7 months ago (2016-05-11 04:24:10 UTC) #10
hashimoto
https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc#newcode63 components/drive/chromeos/file_cache.cc:63: bool SetFileAttributes(const base::FilePath& path, int64_t flags) { On 2016/05/11 ...
4 years, 7 months ago (2016-05-11 06:29:12 UTC) #11
yawano
https://codereview.chromium.org/1918243004/diff/200001/components/drive/chromeos/file_cache.h File components/drive/chromeos/file_cache.h (right): https://codereview.chromium.org/1918243004/diff/200001/components/drive/chromeos/file_cache.h#newcode193 components/drive/chromeos/file_cache.h:193: bool MigrateCacheFilesResolvingInconsistency(); How about "validate"?
4 years, 7 months ago (2016-05-11 06:32:47 UTC) #13
oka
validate sounds like it has no side effect. FixMetadataAndFileAttributes? On Wed, May 11, 2016 at ...
4 years, 7 months ago (2016-05-11 06:34:59 UTC) #14
hashimoto
sgtm. It doesn't look pretty, but I couldn't come up with a better name :/ ...
4 years, 7 months ago (2016-05-11 07:45:44 UTC) #15
oka
Resolve comments.
4 years, 7 months ago (2016-05-11 09:33:28 UTC) #16
oka
PTAL https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/140001/components/drive/chromeos/file_cache.cc#newcode63 components/drive/chromeos/file_cache.cc:63: bool SetFileAttributes(const base::FilePath& path, int64_t flags) { On ...
4 years, 7 months ago (2016-05-11 09:35:04 UTC) #17
hashimoto
https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc#newcode831 components/drive/chromeos/file_cache.cc:831: file_cache_entry->set_is_pinned(false); Do we really need to unpin the file ...
4 years, 7 months ago (2016-05-12 07:12:11 UTC) #18
oka
PTAL https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc#newcode831 components/drive/chromeos/file_cache.cc:831: file_cache_entry->set_is_pinned(false); On 2016/05/12 07:12:11, hashimoto wrote: > Do ...
4 years, 7 months ago (2016-05-12 09:18:32 UTC) #19
hashimoto
https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc#newcode831 components/drive/chromeos/file_cache.cc:831: file_cache_entry->set_is_pinned(false); On 2016/05/12 09:18:32, oka wrote: > On 2016/05/12 ...
4 years, 7 months ago (2016-05-12 09:24:35 UTC) #20
oka
Nit
4 years, 7 months ago (2016-05-12 09:38:56 UTC) #21
oka
PTAL https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc File components/drive/chromeos/file_cache.cc (right): https://codereview.chromium.org/1918243004/diff/240001/components/drive/chromeos/file_cache.cc#newcode831 components/drive/chromeos/file_cache.cc:831: file_cache_entry->set_is_pinned(false); On 2016/05/12 09:24:35, hashimoto wrote: > On ...
4 years, 7 months ago (2016-05-12 09:40:26 UTC) #22
oka
Nit
4 years, 7 months ago (2016-05-12 09:41:50 UTC) #23
hashimoto
lgtm thanks!
4 years, 7 months ago (2016-05-12 09:49:39 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1918243004/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1918243004/320001
4 years, 7 months ago (2016-05-12 11:13:31 UTC) #27
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 7 months ago (2016-05-12 11:52:47 UTC) #29
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/1d5bdf653f3859d29ae3b6ad7535cefc3702f45d Cr-Commit-Position: refs/heads/master@{#393229}
4 years, 7 months ago (2016-05-12 11:54:31 UTC) #31
oka
4 years, 7 months ago (2016-05-19 07:11:08 UTC) #32
Message was sent while issue was closed.
A revert of this CL (patchset #17 id:320001) has been created in
https://codereview.chromium.org/1989863005/ by oka@chromium.org.

The reason for reverting is: Corresponding changes for Chrome OS haven't been
submitted. Let's punt this change to M53..

Powered by Google App Engine
This is Rietveld 408576698