{"action":"created","issue":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/2922","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/2922/labels{/name}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/2922/comments","events_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/2922/events","html_url":"https://github.com/zfsonlinux/zfs/issues/2922","id":49790441,"number":2922,"title":"Linux quota API support ","user":{"login":"pavel-odintsov","id":2744166,"avatar_url":"https://avatars.githubusercontent.com/u/2744166?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-odintsov","html_url":"https://github.com/pavel-odintsov","followers_url":"https://api.github.com/users/pavel-odintsov/followers","following_url":"https://api.github.com/users/pavel-odintsov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-odintsov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-odintsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-odintsov/subscriptions","organizations_url":"https://api.github.com/users/pavel-odintsov/orgs","repos_url":"https://api.github.com/users/pavel-odintsov/repos","events_url":"https://api.github.com/users/pavel-odintsov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-odintsov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zfsonlinux/zfs/labels/Difficulty%20-%20Medium","name":"Difficulty - Medium","color":"207de5"},{"url":"https://api.github.com/repos/zfsonlinux/zfs/labels/Feature","name":"Feature","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-11-22T13:29:29Z","updated_at":"2015-03-21T19:47:20Z","closed_at":null,"body":"Hello, folks!\r\n\r\nI'm using ZFS with OpenVZ containers (separate ZFS volume for every containers) and customers want standard linux quotas inside containers (inside ZFS volume).\r\n\r\nIs it possible to provide API for backward compatibility for old software without ZFS quota support? "},"comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/comments/84444700","html_url":"https://github.com/zfsonlinux/zfs/issues/2922#issuecomment-84444700","issue_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/2922","id":84444700,"user":{"login":"paboldin","id":1818561,"avatar_url":"https://avatars.githubusercontent.com/u/1818561?v=3","gravatar_id":"","url":"https://api.github.com/users/paboldin","html_url":"https://github.com/paboldin","followers_url":"https://api.github.com/users/paboldin/followers","following_url":"https://api.github.com/users/paboldin/following{/other_user}","gists_url":"https://api.github.com/users/paboldin/gists{/gist_id}","starred_url":"https://api.github.com/users/paboldin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paboldin/subscriptions","organizations_url":"https://api.github.com/users/paboldin/orgs","repos_url":"https://api.github.com/users/paboldin/repos","events_url":"https://api.github.com/users/paboldin/events{/privacy}","received_events_url":"https://api.github.com/users/paboldin/received_events","type":"User","site_admin":false},"created_at":"2015-03-21T19:47:20Z","updated_at":"2015-03-21T19:47:20Z","body":"@behlendorf well, I did some investigation and compiled results into the following plan:\r\n\r\n1. Implement an option for the ZFS instance that makes kernel export pseudo block-device named e.g. `/dev/zfsfakes/<mountpoint>` for the `quotactl` tools to use. This is required because `quotaon` and other tools do check for existence of the blockdevice used as a mountpoint. Note that this will also change the `/etc/fstab` entries for the ZFS instance a bit different. The other option was to patch the `quota` tools but the `quotactl` requires a valid block device to acquire `struct super_block` anyway.\r\n2. Implement appropriate `quotactl_ops` using the API provided. Use `zfs_set_userquota` for setting quota (`quotactl_ops->set_dqblk`) and general `*get_props` to read the quota status. As far as I see there is no `grace` implementation since there is no `softlimit` so no `quotactl_ops->set_info` is required.\r\n\r\nIs this corresponding with your expectations? I'm very interested if there is any alternative for the first item."}}