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

Issue 605513002: [NaCl SDK] nacl_io: Replace allocated ino with hash of path. (Closed)

Created:
6 years, 3 months ago by noelallen1
Modified:
6 years, 2 months ago
Reviewers:
binji, Sam Clegg
CC:
chromium-reviews, binji+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Replace allocated ino with hash of path. HTML5FS (PPAPI) does not provide an INO so it is impossible to determine a files uniqueness. In addition, node information does not persist in memory since nodes could be transparently destroyed from JavaScript, thus creating leaks. Because of this the current stack based INO allocation causes sequentially accesed file handles to report the same INO. HTML5FS (including media galleries) does not traverse links. This implies that all paths normalized to the mount are unique. We use this property to generate a 64 bit hash. R=binji@chromium.org BUG=414938 Committed: https://crrev.com/40b895fd4ef2aef2d1ae1ba2c66c2f9f58dc6310 Cr-Commit-Position: refs/heads/master@{#296840}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Share hash for GetDents, add test #

Patch Set 3 : Fix test #

Total comments: 4

Patch Set 4 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -4 lines) Patch
M native_client_sdk/src/libraries/nacl_io/filesystem.h View 1 chunk +2 lines, -2 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc View 1 2 3 2 chunks +39 lines, -0 lines 0 comments Download
M native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs_node.cc View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M native_client_sdk/src/tests/nacl_io_test/html5_fs_test.cc View 1 2 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
noelallen1
PTAL
6 years, 3 months ago (2014-09-25 02:53:36 UTC) #1
binji
Also can you add a test for this? https://codereview.chromium.org/605513002/diff/1/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc File native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc (right): https://codereview.chromium.org/605513002/diff/1/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc#newcode34 native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc:34: static ...
6 years, 2 months ago (2014-09-25 15:01:17 UTC) #2
Sam Clegg
Can you prefix the CL descriptions with "[NaCl SDK] nacl_io:"? "current" is misspelled in CL ...
6 years, 2 months ago (2014-09-25 15:49:32 UTC) #4
noelallen1
binji - I'm not sure what a meaningful test is. Since there can be a ...
6 years, 2 months ago (2014-09-25 18:10:09 UTC) #5
Sam Clegg
I think it should be possible to write a test that compares the inode number ...
6 years, 2 months ago (2014-09-25 19:12:09 UTC) #6
Sam Clegg
I chatted with Noel about this and we both agree that a more extensive fix ...
6 years, 2 months ago (2014-09-25 19:14:57 UTC) #7
noelallen1
Since we are moving from what is effectively one random number generator to effectively another ...
6 years, 2 months ago (2014-09-25 21:01:38 UTC) #8
Sam Clegg
On 2014/09/25 21:01:38, noelallen1 wrote: > Since we are moving from what is effectively one ...
6 years, 2 months ago (2014-09-25 21:30:36 UTC) #9
binji
lgtm https://codereview.chromium.org/605513002/diff/40001/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc File native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc (right): https://codereview.chromium.org/605513002/diff/40001/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc#newcode49 native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc:49: size_t len = strlen(ptr); OK, but you could ...
6 years, 2 months ago (2014-09-25 21:52:04 UTC) #10
noelallen1
https://codereview.chromium.org/605513002/diff/40001/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc File native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc (right): https://codereview.chromium.org/605513002/diff/40001/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc#newcode49 native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc:49: size_t len = strlen(ptr); On 2014/09/25 21:52:04, binji wrote: ...
6 years, 2 months ago (2014-09-25 22:39:55 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/605513002/60001
6 years, 2 months ago (2014-09-25 22:41:23 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001) as f6b2de16639e5ac9b58e18ae58fb8372ebaa6366
6 years, 2 months ago (2014-09-26 00:15:28 UTC) #14
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 00:16:10 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/40b895fd4ef2aef2d1ae1ba2c66c2f9f58dc6310
Cr-Commit-Position: refs/heads/master@{#296840}

Powered by Google App Engine
This is Rietveld 408576698