Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for user/group dnode accounting & quota #2577

Closed
wants to merge 1 commit into from

Conversation

@johannlombardi
Copy link

johannlombardi commented Aug 7, 2014

This patch tracks dnode usage for each user/group in the
DMU_USER/GROUPUSED_OBJECT ZAPs. ZAP entries dedicated to dnode
accounting have the key prefixed with "dn-" followed by the UID/GID
in string format (as done for the block accounting).
A new SPA feature has been added for dnode accounting as well as
a new ZPL version. The SPA feature must be enabled in the pool
before upgrading the zfs filesystem. During the zfs version upgrade,
a "quotacheck" will be executed by marking all dnode as dirty.

TODO: add dnode limit enforcement

Signed-off-by: Johann Lombardi johann.lombardi@intel.com

This patch tracks dnode usage for each user/group in the
DMU_USER/GROUPUSED_OBJECT ZAPs. ZAP entries dedicated to dnode
accounting have the key prefixed with "dn-" followed by the UID/GID
in string format (as done for the block accounting).
A new SPA feature has been added for dnode accounting as well as
a new ZPL version. The SPA feature must be enabled in the pool
before upgrading the zfs filesystem. During the zfs version upgrade,
a "quotacheck" will be executed by marking all dnode as dirty.

TODO: add dnode limit enforcement

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
@ryao
Copy link
Contributor

ryao commented Aug 10, 2014

I do not have time to do a full review, but I can give you some comments. First, there are some style issues with this:

./lib/libzfs/libzfs_dataset.c: 2606: continuation line not indented by 4 spaces
./lib/libzfs/libzfs_dataset.c: 2608: line > 80 characters
./lib/libzfs/libzfs_dataset.c: 2608: continuation line not indented by 4 spaces
./lib/libzfs/libzfs_dataset.c: 2742: spaces instead of tabs
./module/zfs/zfs_vfsops.c: 473: spaces instead of tabs
./module/zfs/zfs_vfsops.c: 548: spaces instead of tabs
./module/zfs/zfeature_common.c: 223: indent by spaces instead of tabs
./module/zfs/zfeature_common.c: 224: indent by spaces instead of tabs
./module/zfs/zfeature_common.c: 225: indent by spaces instead of tabs
./module/zfs/dnode_sync.c: 582: line > 80 characters
./module/zfs/dmu_objset.c: 1136: spaces instead of tabs
./module/zfs/dmu_objset.c: 1137: spaces instead of tabs
./module/zfs/dmu_objset.c: 1163: continuation line not indented by 4 spaces
./module/zfs/dmu_objset.c: 1165: continuation line not indented by 4 spaces
./module/zfs/dmu_objset.c: 1167: line > 80 characters
./module/zfs/dmu_objset.c: 1171: line > 80 characters
./module/zfs/dmu_objset.c: 1215: line > 80 characters
./cmd/zfs/zfs_main.c: 2807: spaces instead of tabs
./cmd/zfs/zfs_main.c: 2810: line > 80 characters
./cmd/zfs/zfs_main.c: 2810: spaces instead of tabs

Second, I see that you used ZFS instead of using it. That is likely the logical choice, but unfortunately, Solaris has already used that and reusing it will make an unfortunate situation with respect to platform incompatibility worse. This is why feature flags were designed, but so far, they have only been implemented for the zpool version because we had nothing that needed it for the ZFS version. This would merit feature flags on the ZFS version, so that would need to be done before it could be merged, provided that there are no other potential issues and this is portable enough that other Open ZFS implementations could merge it so that we remain compatible with them.

@pavel-odintsov
Copy link

pavel-odintsov commented Jan 9, 2015

Hello, folks!

Do you have any news about this feature? My company can fund your work because we interested in this feature very deeply.

@behlendorf
Copy link
Contributor

behlendorf commented Jan 16, 2015

@thegreatgazoo has been working on getting this implemented.

@behlendorf
Copy link
Contributor

behlendorf commented Jun 17, 2015

An alternate way to implement this was worked out and posted in #3500 which doesn't suffer from some of the downsides of this approach. This patch still may be used as a good place to start to implement #3500 but it won't be merged as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.