{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18560","labels_url":"https://api.github.com/repos/docker/docker/issues/18560/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18560/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18560/events","html_url":"https://github.com/docker/docker/pull/18560","id":121416507,"number":18560,"title":"WIP alternative overlay driver using multiple ro layers","user":{"login":"vikstrous","id":482425,"avatar_url":"https://avatars.githubusercontent.com/u/482425?v=3","gravatar_id":"","url":"https://api.github.com/users/vikstrous","html_url":"https://github.com/vikstrous","followers_url":"https://api.github.com/users/vikstrous/followers","following_url":"https://api.github.com/users/vikstrous/following{/other_user}","gists_url":"https://api.github.com/users/vikstrous/gists{/gist_id}","starred_url":"https://api.github.com/users/vikstrous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikstrous/subscriptions","organizations_url":"https://api.github.com/users/vikstrous/orgs","repos_url":"https://api.github.com/users/vikstrous/repos","events_url":"https://api.github.com/users/vikstrous/events{/privacy}","received_events_url":"https://api.github.com/users/vikstrous/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-12-10T06:40:24Z","updated_at":"2016-01-17T09:58:33Z","closed_at":"2016-01-15T21:47:29Z","pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/18560","html_url":"https://github.com/docker/docker/pull/18560","diff_url":"https://github.com/docker/docker/pull/18560.diff","patch_url":"https://github.com/docker/docker/pull/18560.patch"},"body":"I started working on an overlay storage driver that doesn't use so many hardlinks and instead uses multiple read-only layers. The code is still pretty rough, but I wanted to open this PR to get some initial feedback on the idea.\r\n\r\nI'm basically merging a bunch of code from the overlay driver and the aufs driver to produce an overlay driver that uses the directory structure and general approach of the aufs driver. Instead of hardlinking the lower layer into the upper layer when applying a diff, I'm just taking advantage of multiple read-only mounts. This feature was added to overlay in linux 3.19.\r\n\r\nMajor TODOs left:\r\n* [x] convert overlayfs whiteouts and opaque directories to the AUFS format\r\n* [ ] handle more than one page worth of mount arguments by chaining multiple mounts - I think we can simply Get an intermediate parent, then release them when we are released. We might have to store some metadata about parents in the `layers` file, indicating if the lowest parent is a `mnt` or `diff` .... maybe we shouldn't Get them because we really want those layers to be ro\r\n* [x] detect support based on kernel version\r\n\r\nI still have to clean up the code quite a bit, but it seems to work so far as long as  you don't have too many layers for one container and as long as you don't push/pull images that need to also work with other drivers.\r\n\r\nI don't have any tests yet, so any tips for testing this would be appreciated.\r\n\r\nI created this PR against 1.9 because it's stable, but there's no reason this wouldn't work with minimal modifications against master as well.\r\n\r\nOther TODOs:\r\n* [ ] Make sure it works with user namespaces\r\n* [x] Add back the checks for incompatible underlying filesystem from the overlay driver\r\n* [x] Return more info to docker inspect (GetMetadata)\r\n* [ ] Think of more info to show in Status\r\n* [x] Implement Changes correctly (what is it used for?) Should this Get the layer and its parent and do a Diff like NaiveDiffDriver or should this do the diff directly? \r\n* [ ] Do we need to do anything on Cleanup?\r\n* [ ] Confirm that DiffSize doesn't need to be 100% exact (the size of xattrs vs opaque aufs files, etc. is different)\r\n* [ ] Write tests"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/172306916","html_url":"https://github.com/docker/docker/pull/18560#issuecomment-172306916","issue_url":"https://api.github.com/repos/docker/docker/issues/18560","id":172306916,"user":{"login":"vikstrous","id":482425,"avatar_url":"https://avatars.githubusercontent.com/u/482425?v=3","gravatar_id":"","url":"https://api.github.com/users/vikstrous","html_url":"https://github.com/vikstrous","followers_url":"https://api.github.com/users/vikstrous/followers","following_url":"https://api.github.com/users/vikstrous/following{/other_user}","gists_url":"https://api.github.com/users/vikstrous/gists{/gist_id}","starred_url":"https://api.github.com/users/vikstrous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikstrous/subscriptions","organizations_url":"https://api.github.com/users/vikstrous/orgs","repos_url":"https://api.github.com/users/vikstrous/repos","events_url":"https://api.github.com/users/vikstrous/events{/privacy}","received_events_url":"https://api.github.com/users/vikstrous/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T09:58:33Z","updated_at":"2016-01-17T09:58:33Z","body":"It looks like https://bugzilla.kernel.org/show_bug.cgi?id=109601 was fixed. This was the fix: https://github.com/torvalds/linux/commit/1c8a47df36d72ace8cf78eb6c228aa0f8027d3c2 It was a problem only between kernel versions 4.2 and 4.3 I'll make a new PR against master and we can probably get this into docker 1.11, but this new overlay driver will require kernel version 4.3.3."}}