Skip to content

Commit c0f2977

Browse files
committed
Add userobj, groupobj and project quotas
Change vnode ioctl to fcntl XNU will deny ioctl to any vnode that is not BLK or CHR. It is expected that fcntl() is used in this case. Change "zfs project" to use fcntl to query projid. Potentially there is no way to set project, without an equivalent tool to Linux "chattr". But pool import should at least work, as well as quota restrictions.
1 parent bbfa515 commit c0f2977

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2715
-411
lines changed

cmd/zdb/zdb.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,11 +2209,13 @@ dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header,
22092209
}
22102210

22112211
if (verbosity >= 4) {
2212-
(void) printf("\tdnode flags: %s%s%s\n",
2212+
(void) printf("\tdnode flags: %s%s%s%s\n",
22132213
(dn->dn_phys->dn_flags & DNODE_FLAG_USED_BYTES) ?
22142214
"USED_BYTES " : "",
22152215
(dn->dn_phys->dn_flags & DNODE_FLAG_USERUSED_ACCOUNTED) ?
22162216
"USERUSED_ACCOUNTED " : "",
2217+
(dn->dn_phys->dn_flags & DNODE_FLAG_USEROBJUSED_ACCOUNTED) ?
2218+
"USEROBJUSED_ACCOUNTED " : "",
22172219
(dn->dn_phys->dn_flags & DNODE_FLAG_SPILL_BLKPTR) ?
22182220
"SPILL_BLKPTR" : "");
22192221
(void) printf("\tdnode maxblkid: %llu\n",
@@ -3010,16 +3012,17 @@ dump_one_dir(const char *dsname, void *arg)
30103012
{
30113013
int error;
30123014
objset_t *os;
3015+
spa_feature_t f;
30133016

30143017
error = open_objset(dsname, DMU_OST_ANY, FTAG, &os);
30153018
if (error != 0)
30163019
return (0);
30173020

3018-
for (spa_feature_t f = 0; f < SPA_FEATURES; f++) {
3019-
if (!dmu_objset_ds(os)->ds_feature_inuse[f])
3021+
for (f = 0; f < SPA_FEATURES; f++) {
3022+
if (!dsl_dataset_feature_is_active(dmu_objset_ds(os), f))
30203023
continue;
30213024
ASSERT(spa_feature_table[f].fi_flags &
3022-
ZFEATURE_FLAG_PER_DATASET);
3025+
ZFEATURE_FLAG_PER_DATASET);
30233026
dataset_feature_count[f]++;
30243027
}
30253028

cmd/zfs/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ zfs_SOURCES = \
1313
zfs_iter.h \
1414
zfs_main.c \
1515
zfs_osx.m \
16-
zfs_util.h
16+
zfs_util.h \
17+
zfs_project.c \
18+
zfs_projectutil.h
1719

1820
zfs_LDADD = \
1921
$(top_builddir)/lib/libnvpair/libnvpair.la \

0 commit comments

Comments
 (0)