{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/196788703","pull_request_review_id":130406743,"id":196788703,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njc4ODcwMw==","diff_hunk":"@@ -233,6 +234,49 @@ class Ocfs2(Filesystem):\n     MKFS_FORCE_FLAGS = '-Fx'\n \n \n+class F2fs(Filesystem):\n+    MKFS = 'mkfs.f2fs'\n+    GROW = 'resize.f2fs'\n+\n+    @property\n+    def MKFS_FORCE_FLAGS(self):\n+        mkfs = self.module.get_bin_path(self.MKFS, required=True)\n+        cmd = \"%s %s\" % (mkfs, os.devnull)\n+        _, out, _ = self.module.run_command(cmd, check_rc=False)\n+        # Looking for \"\tF2FS-tools: mkfs.f2fs Ver: 1.10.0 (2018-01-30)\"\n+        # mkfs.f2fs displays version since v1.2.0\n+        match = re.search(r\"F2FS-tools: mkfs.f2fs Ver: ([0-9.]+) \\(\", out)\n+        if match is not None:\n+            # Since 1.9.0, mkfs.f2fs check overwrite before make filesystem\n+            # before that version -f switch wasn't used\n+            if LooseVersion(match.group(1)) >= LooseVersion('1.9.0'):\n+                return '-f'\n+\n+        return ''\n+\n+    def get_fs_size(self, dev):\n+        cmd = self.module.get_bin_path('dump.f2fs', required=True)\n+        # Get sector count and sector size\n+        _, dump, _ = self.module.run_command([cmd, str(dev)], check_rc=True)\n+        sector_size = None\n+        sector_count = None\n+        for line in dump.splitlines():\n+            if 'Info: sector size = ' in line:","path":"lib/ansible/modules/system/filesystem.py","position":57,"original_position":57,"commit_id":"13cb3e4d43786d09f5519896e41a3a3966960079","original_commit_id":"13cb3e4d43786d09f5519896e41a3a3966960079","user":{"login":"mscherer","id":230335,"node_id":"MDQ6VXNlcjIzMDMzNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/230335?v=4","gravatar_id":"","url":"https://api.github.com/users/mscherer","html_url":"https://github.com/mscherer","followers_url":"https://api.github.com/users/mscherer/followers","following_url":"https://api.github.com/users/mscherer/following{/other_user}","gists_url":"https://api.github.com/users/mscherer/gists{/gist_id}","starred_url":"https://api.github.com/users/mscherer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mscherer/subscriptions","organizations_url":"https://api.github.com/users/mscherer/orgs","repos_url":"https://api.github.com/users/mscherer/repos","events_url":"https://api.github.com/users/mscherer/events{/privacy}","received_events_url":"https://api.github.com/users/mscherer/received_events","type":"User","site_admin":false},"body":"The locale should be set to C if we do string matching.","created_at":"2018-06-20T13:56:01Z","updated_at":"2018-06-20T13:56:01Z","html_url":"https://github.com/ansible/ansible/pull/40489#discussion_r196788703","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/40489","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/196788703"},"html":{"href":"https://github.com/ansible/ansible/pull/40489#discussion_r196788703"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/40489"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/40489","id":189410862,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5NDEwODYy","html_url":"https://github.com/ansible/ansible/pull/40489","diff_url":"https://github.com/ansible/ansible/pull/40489.diff","patch_url":"https://github.com/ansible/ansible/pull/40489.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/40489","number":40489,"state":"open","locked":false,"title":"Filesystem: add support for F2FS","user":{"login":"pilou-","id":1356830,"node_id":"MDQ6VXNlcjEzNTY4MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1356830?v=4","gravatar_id":"","url":"https://api.github.com/users/pilou-","html_url":"https://github.com/pilou-","followers_url":"https://api.github.com/users/pilou-/followers","following_url":"https://api.github.com/users/pilou-/following{/other_user}","gists_url":"https://api.github.com/users/pilou-/gists{/gist_id}","starred_url":"https://api.github.com/users/pilou-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilou-/subscriptions","organizations_url":"https://api.github.com/users/pilou-/orgs","repos_url":"https://api.github.com/users/pilou-/repos","events_url":"https://api.github.com/users/pilou-/events{/privacy}","received_events_url":"https://api.github.com/users/pilou-/received_events","type":"User","site_admin":false},"body":"##### SUMMARY\r\nFilesystem: add support for F2FS\r\n\r\nIntegration tests provided (Ubuntu 16.04, Fedora (all versions), OpenSuse)\r\n\r\nFixes #40418\r\n\r\n##### ISSUE TYPE\r\n - Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\nfilesystem\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.6.0 (devel 44d9dd2c77) last updated 2018/05/20 14:41:59 (GMT +200)\r\n```\r\n\r\n##### ADDITIONAL INFORMATION\r\n\r\ngrow/resize operation requires quite a recent version of f2fs-tools.","created_at":"2018-05-21T15:25:10Z","updated_at":"2018-06-20T13:56:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffad57d6034097f752ed7c855031eb6110c1780a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":835286067,"node_id":"MDU6TGFiZWw4MzUyODYwNjc=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.6","name":"affects_2.6","color":"ededed","default":false},{"id":501518759,"node_id":"MDU6TGFiZWw1MDE1MTg3NTk=","url":"https://api.github.com/repos/ansible/ansible/labels/community_review","name":"community_review","color":"f9d0c4","default":false},{"id":852590921,"node_id":"MDU6TGFiZWw4NTI1OTA5MjE=","url":"https://api.github.com/repos/ansible/ansible/labels/feature","name":"feature","color":"006b75","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false},{"id":468273802,"node_id":"MDU6TGFiZWw0NjgyNzM4MDI=","url":"https://api.github.com/repos/ansible/ansible/labels/test","name":"test","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/40489/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/40489/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/40489/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/13cb3e4d43786d09f5519896e41a3a3966960079","head":{"label":"pilou-:filesystem_handle_f2fs","ref":"filesystem_handle_f2fs","sha":"13cb3e4d43786d09f5519896e41a3a3966960079","user":{"login":"pilou-","id":1356830,"node_id":"MDQ6VXNlcjEzNTY4MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1356830?v=4","gravatar_id":"","url":"https://api.github.com/users/pilou-","html_url":"https://github.com/pilou-","followers_url":"https://api.github.com/users/pilou-/followers","following_url":"https://api.github.com/users/pilou-/following{/other_user}","gists_url":"https://api.github.com/users/pilou-/gists{/gist_id}","starred_url":"https://api.github.com/users/pilou-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilou-/subscriptions","organizations_url":"https://api.github.com/users/pilou-/orgs","repos_url":"https://api.github.com/users/pilou-/repos","events_url":"https://api.github.com/users/pilou-/events{/privacy}","received_events_url":"https://api.github.com/users/pilou-/received_events","type":"User","site_admin":false},"repo":{"id":17963949,"node_id":"MDEwOlJlcG9zaXRvcnkxNzk2Mzk0OQ==","name":"ansible","full_name":"pilou-/ansible","owner":{"login":"pilou-","id":1356830,"node_id":"MDQ6VXNlcjEzNTY4MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1356830?v=4","gravatar_id":"","url":"https://api.github.com/users/pilou-","html_url":"https://github.com/pilou-","followers_url":"https://api.github.com/users/pilou-/followers","following_url":"https://api.github.com/users/pilou-/following{/other_user}","gists_url":"https://api.github.com/users/pilou-/gists{/gist_id}","starred_url":"https://api.github.com/users/pilou-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilou-/subscriptions","organizations_url":"https://api.github.com/users/pilou-/orgs","repos_url":"https://api.github.com/users/pilou-/repos","events_url":"https://api.github.com/users/pilou-/events{/privacy}","received_events_url":"https://api.github.com/users/pilou-/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pilou-/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":true,"url":"https://api.github.com/repos/pilou-/ansible","forks_url":"https://api.github.com/repos/pilou-/ansible/forks","keys_url":"https://api.github.com/repos/pilou-/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pilou-/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pilou-/ansible/teams","hooks_url":"https://api.github.com/repos/pilou-/ansible/hooks","issue_events_url":"https://api.github.com/repos/pilou-/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/pilou-/ansible/events","assignees_url":"https://api.github.com/repos/pilou-/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/pilou-/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/pilou-/ansible/tags","blobs_url":"https://api.github.com/repos/pilou-/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pilou-/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pilou-/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/pilou-/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pilou-/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/pilou-/ansible/languages","stargazers_url":"https://api.github.com/repos/pilou-/ansible/stargazers","contributors_url":"https://api.github.com/repos/pilou-/ansible/contributors","subscribers_url":"https://api.github.com/repos/pilou-/ansible/subscribers","subscription_url":"https://api.github.com/repos/pilou-/ansible/subscription","commits_url":"https://api.github.com/repos/pilou-/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/pilou-/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/pilou-/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/pilou-/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/pilou-/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/pilou-/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pilou-/ansible/merges","archive_url":"https://api.github.com/repos/pilou-/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pilou-/ansible/downloads","issues_url":"https://api.github.com/repos/pilou-/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/pilou-/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/pilou-/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/pilou-/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pilou-/ansible/labels{/name}","releases_url":"https://api.github.com/repos/pilou-/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/pilou-/ansible/deployments","created_at":"2014-03-21T01:05:25Z","updated_at":"2018-04-23T00:48:36Z","pushed_at":"2018-06-19T19:57:36Z","git_url":"git://github.com/pilou-/ansible.git","ssh_url":"git@github.com:pilou-/ansible.git","clone_url":"https://github.com/pilou-/ansible.git","svn_url":"https://github.com/pilou-/ansible","homepage":"http://ansible.com/","size":114402,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"174d969714d103453bc5eda03a99da5c4aa38131","user":{"login":"ansible","id":1507452,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDc0NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"node_id":"MDEwOlJlcG9zaXRvcnkzNjM4OTY0","name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDc0NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications — automate in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com/ansible/","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2018-06-20T10:43:47Z","pushed_at":"2018-06-20T13:24:03Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"https://www.ansible.com/","size":128276,"stargazers_count":30837,"watchers_count":30837,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11681,"mirror_url":null,"archived":false,"open_issues_count":5143,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":11681,"open_issues":5143,"watchers":30837,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/40489"},"html":{"href":"https://github.com/ansible/ansible/pull/40489"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/40489"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/40489/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/40489/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/40489/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/13cb3e4d43786d09f5519896e41a3a3966960079"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mscherer"}}