{"action":"closed","issue":{"url":"https://api.github.com/repos/memkind/memkind/issues/107","repository_url":"https://api.github.com/repos/memkind/memkind","labels_url":"https://api.github.com/repos/memkind/memkind/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/memkind/memkind/issues/107/comments","events_url":"https://api.github.com/repos/memkind/memkind/issues/107/events","html_url":"https://github.com/memkind/memkind/issues/107","id":368318915,"node_id":"MDU6SXNzdWUzNjgzMTg5MTU=","number":107,"title":"Should memkind_create_pmem check for DAX option in mounted directory?","user":{"login":"haraldservat","id":13621384,"node_id":"MDQ6VXNlcjEzNjIxMzg0","avatar_url":"https://avatars1.githubusercontent.com/u/13621384?v=4","gravatar_id":"","url":"https://api.github.com/users/haraldservat","html_url":"https://github.com/haraldservat","followers_url":"https://api.github.com/users/haraldservat/followers","following_url":"https://api.github.com/users/haraldservat/following{/other_user}","gists_url":"https://api.github.com/users/haraldservat/gists{/gist_id}","starred_url":"https://api.github.com/users/haraldservat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haraldservat/subscriptions","organizations_url":"https://api.github.com/users/haraldservat/orgs","repos_url":"https://api.github.com/users/haraldservat/repos","events_url":"https://api.github.com/users/haraldservat/events{/privacy}","received_events_url":"https://api.github.com/users/haraldservat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-09T17:33:40Z","updated_at":"2018-10-17T15:00:30Z","closed_at":"2018-10-17T15:00:30Z","author_association":"NONE","body":"When running the following code with memkind (master - revision 21bf2e0 - dated 09th Oct 2018) and passing it the paramater /tmp (which is a  regular /tmp partition , i.e. not supporting DAX), I get a \"Successful message\".\r\n\r\nI believe that  memkind_create_pmem should fail if parameter 1 (path) is not a DAX filesystem, right?\r\n\r\n```\r\n# include <stdio.h>\r\n# include <stdlib.h>\r\n# include <unistd.h>\r\n# include <memkind.h>\r\n\r\nint main(int argc, char *argv[])\r\n{\r\n        if (argc != 2)\r\n        {\r\n                fprintf (stderr, \"Error! Missing directory to pass to memkind_create_pmem\\n\");\r\n                return -2;\r\n        }\r\n        printf (\"Invoking: memkind_get_version();\\nReturned: %d\\n\", memkind_get_version());\r\n        memkind_t pmem_kind;\r\n        printf (\"Invoking: memkind_create_pmem (\\\"%s\\\", 0, %p);\\n\", argv[1], &pmem_kind);\r\n        int err = memkind_create_pmem (argv[1], 0, &pmem_kind);\r\n        if (err)\r\n        {\r\n                char msg[1024];\r\n                memkind_error_message (err, msg, sizeof(msg));\r\n                fprintf (stderr,\"Returned: Error during memkind_create_pmem: %s\\n\", msg);\r\n                return -1;\r\n        }\r\n        printf (\"Returned: Successful!\\n\");\r\n        return 0;\r\n}\r\n```\r\n\r\nHere are the output of the commands:\r\n\r\n```\r\n$ make\r\ngcc -O -g test1.c -o test1 -I/nfs/pdx/home/hservatg/aplic/memkind/20181009/include -L/nfs/pdx/home/hservatg/aplic/memkind/20181009/lib -Wl,-rpath -Wl,/nfs/pdx/home/hservatg/aplic/memkind/20181009/lib -lmemkind\r\n$ mount | grep /tmp\r\ntmpfs on /tmp type tmpfs (rw,nosuid,nodev)\r\n.$ /test1 /tmp\r\nInvoking: memkind_get_version();\r\nReturned: 1007000\r\nInvoking: memkind_create_pmem (\"/tmp\", 0, 0x7ffd80f5b4d8);\r\nReturned: Successful!\r\n```"}}
{"actor":{"display_login":"haraldservat"}}