From 089fbf313c59b178c11614b2aed78efc46d60499 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Tue, 20 Mar 2018 14:55:21 -0400 Subject: [PATCH] Add comments for portable dnode / objset flags This patch adds some comments describing the purpose of "portable" dnode and objset flags so that it is clear when new flags should be added to the repective flag masks. This patch includes no functional changes. Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #7313 --- include/sys/dmu_objset.h | 8 +++++++- include/sys/dnode.h | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/sys/dmu_objset.h b/include/sys/dmu_objset.h index df9b1a73ac2f..0060efd51d8b 100644 --- a/include/sys/dmu_objset.h +++ b/include/sys/dmu_objset.h @@ -62,7 +62,13 @@ struct dmu_tx; #define OBJSET_FLAG_USEROBJACCOUNTING_COMPLETE (1ULL << 1) #define OBJSET_FLAG_PROJECTQUOTA_COMPLETE (1ULL << 2) -/* all flags are currently non-portable */ +/* + * This mask defines the set of flags which are "portable", meaning + * that they can be preserved when doing a raw encrypted zfs send. + * Flags included in this mask will be protected by os_portable_mac + * when the block of dnodes is encrypted. No portable flags currently + * exist. + */ #define OBJSET_CRYPT_PORTABLE_FLAGS_MASK (0) typedef struct objset_phys { diff --git a/include/sys/dnode.h b/include/sys/dnode.h index 9c44a2232403..1cb7cae0935a 100644 --- a/include/sys/dnode.h +++ b/include/sys/dnode.h @@ -150,6 +150,12 @@ enum dnode_dirtycontext { /* User/Group/Project dnode accounting */ #define DNODE_FLAG_USEROBJUSED_ACCOUNTED (1 << 3) +/* + * This mask defines the set of flags which are "portable", meaning + * that they can be preserved when doing a raw encrypted zfs send. + * Flags included in this mask will be protected by AAD when the block + * of dnodes is encrypted. + */ #define DNODE_CRYPT_PORTABLE_FLAGS_MASK (DNODE_FLAG_SPILL_BLKPTR) /*