zfs/module
Todd Seidelmann 03006174b7 Implement default user and group quotas
This change adds the 'defaultuserquota' and 'defaultgroupquota'
properties to ZFS datasets to apply a quota to users and groups that do
not have a specific quota assigned. The default quota checking
mechanism works alongside the existing 'userquota' and 'groupquota'
checks, only taking effect if no quota is assigned for a particular
user/group. This means that it's possible to exceed a default quota
by quite a lot before the user/groupused property is updated and
further writes are denied, which was already the case for
user/groupquota.

Default quotas are implemented similarly to 'normal' user quotas,
but instead of being user properties that are preserved across
snapshots, they default back to none. NB: this is different from the
observed Solaris behavior, which is to preserve default quotas across
snapshot/clone/promote.

For instance, Solaris has:
    # zfs set defaultuserquota=100M tank/fs
    # zfs snap tank/fs@snap
    # zfs clone tank/fs@snap tank/fs-clone
    # zfs get -H defaultuserquota tank/fs-clone
    tank/fs-clone   defaultuserquota        100M    -

Whereas this commit does:
    # zfs set defaultuserquota=100M tank/fs
    # zfs snap tank/fs@snap
    # zfs clone tank/fs@snap tank/fs-clone
    # zfs get -H defaultuserquota tank/fs-clone
    tank/fs-clone	defaultuserquota	none	default

It should also be possible to implement a default project quota using
an analogous process, if doing so makes sense.

Signed-off-by: Todd Seidelmann <seidelma@wharton.upenn.edu>
2024-08-02 17:14:42 -04:00
..
avl Suppress Clang Static Analyzer false positive in the AVL tree code. 2023-03-08 13:51:21 -08:00
icp icp: remove redundant FreeBSD check 2024-05-31 15:13:59 -07:00
lua LUA: Backport CVE-2020-24370's patch 2024-02-07 11:53:05 -08:00
nvpair xdr: header cleanup 2024-04-03 15:13:27 -07:00
os Implement default user and group quotas 2024-08-02 17:14:42 -04:00
unicode Illumos #15286: do_composition() needs sign awareness 2023-01-05 11:16:21 -08:00
zcommon Implement default user and group quotas 2024-08-02 17:14:42 -04:00
zfs Implement default user and group quotas 2024-08-02 17:14:42 -04:00
zstd zstd: don't call zstd_mempool_reap if there are no buffers (#16302) 2024-07-15 14:51:37 -07:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Linux 6.9: Fix UBSAN errors in sa.c (#16380) 2024-07-23 17:13:04 -07:00
Makefile.bsd Makefile.bsd: sort and cleanup source file list 2024-04-03 15:49:22 -07:00
Makefile.in check-zstd-symbols: also ignore __pfx_ symbols 2023-09-18 09:08:41 -07:00