Skip to content

Commit

Permalink
Implement defaultuserquota/defaultgroupquota on FreeBSD
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Seidelmann <[email protected]>
  • Loading branch information
seidelma committed Aug 3, 2024
1 parent 91b5c44 commit 0426a40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/os/freebsd/zfs/sys/zfs_vfsops_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ struct zfsvfs {
uint64_t z_groupobjquota_obj;
uint64_t z_projectquota_obj;
uint64_t z_projectobjquota_obj;
uint64_t z_defaultuserquota_obj;

Check failure on line 116 in include/os/freebsd/zfs/sys/zfs_vfsops_os.h

View workflow job for this annotation

GitHub Actions / checkstyle

spaces instead of tabs
uint64_t z_defaultgroupquota_obj;

Check failure on line 117 in include/os/freebsd/zfs/sys/zfs_vfsops_os.h

View workflow job for this annotation

GitHub Actions / checkstyle

spaces instead of tabs
uint64_t z_replay_eof; /* New end of file - replay only */
sa_attr_type_t *z_attr_table; /* SA attr mapping->id */
#define ZFS_OBJ_MTX_SZ 64
Expand Down
16 changes: 16 additions & 0 deletions module/os/freebsd/zfs/zfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,22 @@ zfsvfs_init(zfsvfs_t *zfsvfs, objset_t *os)
else if (error != 0)
return (error);

error = zap_lookup(os, MASTER_NODE_OBJ,
zfs_prop_to_name(ZFS_PROP_DEFAULTUSERQUOTA),
8, 1, &zfsvfs->z_defaultuserquota_obj);
if (error == ENOENT)
zfsvfs->z_defaultuserquota_obj = 0;

Check failure on line 931 in module/os/freebsd/zfs/zfs_vfsops.c

View workflow job for this annotation

GitHub Actions / checkstyle

non-continuation indented 4 spaces
else if (error != 0)
return (error);

Check failure on line 933 in module/os/freebsd/zfs/zfs_vfsops.c

View workflow job for this annotation

GitHub Actions / checkstyle

non-continuation indented 4 spaces

error = zap_lookup(os, MASTER_NODE_OBJ,
zfs_prop_to_name(ZFS_PROP_DEFAULTGROUPQUOTA),
8, 1, &zfsvfs->z_defaultgroupquota_obj);
if (error == ENOENT)
zfsvfs->z_defaultgroupquota_obj = 0;

Check failure on line 939 in module/os/freebsd/zfs/zfs_vfsops.c

View workflow job for this annotation

GitHub Actions / checkstyle

non-continuation indented 4 spaces
else if (error != 0)
return (error);

Check failure on line 941 in module/os/freebsd/zfs/zfs_vfsops.c

View workflow job for this annotation

GitHub Actions / checkstyle

non-continuation indented 4 spaces

error = zap_lookup(os, MASTER_NODE_OBJ, ZFS_FUID_TABLES, 8, 1,
&zfsvfs->z_fuid_obj);
if (error == ENOENT)
Expand Down

0 comments on commit 0426a40

Please sign in to comment.