Print this page
3742 zfs comments need cleaner, more consistent style
Submitted by:   Will Andrews <willa@spectralogic.com>
Submitted by:   Alan Somers <alans@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>
Reviewed by:    George Wilson <george.wilson@delphix.com>
Reviewed by:    Eric Schrock <eric.schrock@delphix.com>


 225         /* for symlinks, link content follows name */
 226         /* for creates with xvattr data, the name follows the xvattr info */
 227 } lr_create_t;
 228 
 229 /*
 230  * FUID ACL record will be an array of ACEs from the original ACL.
 231  * If this array includes ephemeral IDs, the record will also include
 232  * an array of log-specific FUIDs to replace the ephemeral IDs.
 233  * Only one copy of each unique domain will be present, so the log-specific
 234  * FUIDs will use an index into a compressed domain table.  On replay this
 235  * information will be used to construct real FUIDs (and bypass idmap,
 236  * since it may not be available).
 237  */
 238 
 239 /*
 240  * Log record for creates with optional ACL
 241  * This log record is also used for recording any FUID
 242  * information needed for replaying the create.  If the
 243  * file doesn't have any actual ACEs then the lr_aclcnt
 244  * would be zero.






 245  */
 246 typedef struct {
 247         lr_create_t     lr_create;      /* common create portion */
 248         uint64_t        lr_aclcnt;      /* number of ACEs in ACL */
 249         uint64_t        lr_domcnt;      /* number of unique domains */
 250         uint64_t        lr_fuidcnt;     /* number of real fuids */
 251         uint64_t        lr_acl_bytes;   /* number of bytes in ACL */
 252         uint64_t        lr_acl_flags;   /* ACL flags */
 253         /* lr_acl_bytes number of variable sized ace's follows */
 254         /* if create is also setting xvattr's, then acl data follows xvattr */
 255         /* if ACE FUIDs are needed then they will follow the xvattr_t */
 256         /* Following the FUIDs will be the domain table information. */
 257         /* The FUIDs for the owner and group will be in the lr_create */
 258         /* portion of the record. */
 259         /* name follows ACL data */
 260 } lr_acl_create_t;
 261 
 262 typedef struct {
 263         lr_t            lr_common;      /* common portion of log record */
 264         uint64_t        lr_doid;        /* obj id of directory */
 265         /* name of object to remove follows this */
 266 } lr_remove_t;
 267 
 268 typedef struct {
 269         lr_t            lr_common;      /* common portion of log record */
 270         uint64_t        lr_doid;        /* obj id of directory */
 271         uint64_t        lr_link_obj;    /* obj id of link */
 272         /* name of object to link follows this */
 273 } lr_link_t;
 274 
 275 typedef struct {
 276         lr_t            lr_common;      /* common portion of log record */
 277         uint64_t        lr_sdoid;       /* obj id of source directory */
 278         uint64_t        lr_tdoid;       /* obj id of target directory */
 279         /* 2 strings: names of source and destination follow this */




 225         /* for symlinks, link content follows name */
 226         /* for creates with xvattr data, the name follows the xvattr info */
 227 } lr_create_t;
 228 
 229 /*
 230  * FUID ACL record will be an array of ACEs from the original ACL.
 231  * If this array includes ephemeral IDs, the record will also include
 232  * an array of log-specific FUIDs to replace the ephemeral IDs.
 233  * Only one copy of each unique domain will be present, so the log-specific
 234  * FUIDs will use an index into a compressed domain table.  On replay this
 235  * information will be used to construct real FUIDs (and bypass idmap,
 236  * since it may not be available).
 237  */
 238 
 239 /*
 240  * Log record for creates with optional ACL
 241  * This log record is also used for recording any FUID
 242  * information needed for replaying the create.  If the
 243  * file doesn't have any actual ACEs then the lr_aclcnt
 244  * would be zero.
 245  *
 246  * After lr_acl_flags, there are a lr_acl_bytes number of variable sized ace's.
 247  * If create is also setting xvattr's, then acl data follows xvattr.
 248  * If ACE FUIDs are needed then they will follow the xvattr_t.  Following
 249  * the FUIDs will be the domain table information.  The FUIDs for the owner
 250  * and group will be in lr_create.  Name follows ACL data.
 251  */
 252 typedef struct {
 253         lr_create_t     lr_create;      /* common create portion */
 254         uint64_t        lr_aclcnt;      /* number of ACEs in ACL */
 255         uint64_t        lr_domcnt;      /* number of unique domains */
 256         uint64_t        lr_fuidcnt;     /* number of real fuids */
 257         uint64_t        lr_acl_bytes;   /* number of bytes in ACL */
 258         uint64_t        lr_acl_flags;   /* ACL flags */







 259 } lr_acl_create_t;
 260 
 261 typedef struct {
 262         lr_t            lr_common;      /* common portion of log record */
 263         uint64_t        lr_doid;        /* obj id of directory */
 264         /* name of object to remove follows this */
 265 } lr_remove_t;
 266 
 267 typedef struct {
 268         lr_t            lr_common;      /* common portion of log record */
 269         uint64_t        lr_doid;        /* obj id of directory */
 270         uint64_t        lr_link_obj;    /* obj id of link */
 271         /* name of object to link follows this */
 272 } lr_link_t;
 273 
 274 typedef struct {
 275         lr_t            lr_common;      /* common portion of log record */
 276         uint64_t        lr_sdoid;       /* obj id of source directory */
 277         uint64_t        lr_tdoid;       /* obj id of target directory */
 278         /* 2 strings: names of source and destination follow this */