{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/8","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/8/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/issues/8/events","html_url":"https://github.com/GoogleCloudPlatform/gcsfuse/issues/8","id":62874263,"number":8,"title":"Directory inodes should have a source generation too","user":{"login":"jacobsa","id":202895,"avatar_url":"https://avatars.githubusercontent.com/u/202895?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobsa","html_url":"https://github.com/jacobsa","followers_url":"https://api.github.com/users/jacobsa/followers","following_url":"https://api.github.com/users/jacobsa/following{/other_user}","gists_url":"https://api.github.com/users/jacobsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobsa/subscriptions","organizations_url":"https://api.github.com/users/jacobsa/orgs","repos_url":"https://api.github.com/users/jacobsa/repos","events_url":"https://api.github.com/users/jacobsa/events{/privacy}","received_events_url":"https://api.github.com/users/jacobsa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jacobsa","id":202895,"avatar_url":"https://avatars.githubusercontent.com/u/202895?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobsa","html_url":"https://github.com/jacobsa","followers_url":"https://api.github.com/users/jacobsa/followers","following_url":"https://api.github.com/users/jacobsa/following{/other_user}","gists_url":"https://api.github.com/users/jacobsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobsa/subscriptions","organizations_url":"https://api.github.com/users/jacobsa/orgs","repos_url":"https://api.github.com/users/jacobsa/repos","events_url":"https://api.github.com/users/jacobsa/events{/privacy}","received_events_url":"https://api.github.com/users/jacobsa/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/milestones/2","html_url":"https://github.com/GoogleCloudPlatform/gcsfuse/milestones/alpha","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcsfuse/milestones/2/labels","id":1030191,"number":2,"title":"alpha","description":"","creator":{"login":"jacobsa","id":202895,"avatar_url":"https://avatars.githubusercontent.com/u/202895?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobsa","html_url":"https://github.com/jacobsa","followers_url":"https://api.github.com/users/jacobsa/followers","following_url":"https://api.github.com/users/jacobsa/following{/other_user}","gists_url":"https://api.github.com/users/jacobsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobsa/subscriptions","organizations_url":"https://api.github.com/users/jacobsa/orgs","repos_url":"https://api.github.com/users/jacobsa/repos","events_url":"https://api.github.com/users/jacobsa/events{/privacy}","received_events_url":"https://api.github.com/users/jacobsa/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":4,"state":"open","created_at":"2015-03-19T23:15:13Z","updated_at":"2015-03-25T02:48:09Z","due_on":"2015-03-31T13:00:00Z","closed_at":null},"comments":2,"created_at":"2015-03-19T04:40:43Z","updated_at":"2015-03-25T02:48:09Z","closed_at":"2015-03-25T02:48:09Z","body":"Currently `fileSystem` contains two indexes over its inodes:\r\n\r\n* `fileIndex` is an index over all file inodes by (name, source generation.)\r\n* `dirIndex` is an index over all directory inodes by name.\r\n\r\nIt is suspicious that these are different, and indeed this has come around to bite me when implementing rmdir. The `FakeGCS.DirectoryTest.Rmdir_OpenedForReading` test cases crashes in `checkInvariants` after it creates a directory, deletes it, then creates another with the same name.\r\n\r\nNot having the generation number of the directory's backing object in there makes it very hard to reason about race conditions involving the backing object for the directory. We should make this look just like files.\r\n\r\nAction items:\r\n\r\n* Make sure the delete then recreate with same name case is better covered in tests, both for files and directories. This test only accidentally caught the issue.\r\n\r\n* Make `NewDirInode` accept a `*storage.Object` just like `NewFileInode`, and record it for a `SourceGeneration` method.\r\n\r\n* Unify the two inode indices, both over (name, source generation).\r\n\r\n* Make sure `lookUpOrCreateDirInode` looks like `lookUpOrCreateFileInode`.\r\n\r\nThis is blocking #3."}}