grwilson commented on this pull request.
There are lots of good comments in the pull request that aren't referenced in
the actual code. It would be good to incorporate some of these as comments.
/*
* All forms of zfs create (create, mkdir, mkxattrdir, symlink)
* eventually end up in zfs_mknode(), which assigns the object's
- * creation time and generation number. The generic VOP_CREATE()
- * doesn't have either concept, so we smuggle the values inside
- * the vattr's otherwise unused va_ctime and va_nblocks fields.
+ * creation time, generation number, and dnode slot count. The
+ * generic VOP_CREATE() has no concept of these attributes, so
+ * we smuggle the values inside * the vattr's otherwise unused
Extra "*" -- `inside * the vattr's`
/*
* All forms of zfs create (create, mkdir, mkxattrdir, symlink)
* eventually end up in zfs_mknode(), which assigns the object's
- * creation time and generation number. The generic VOP_CREATE()
- * doesn't have either concept, so we smuggle the values inside
- * the vattr's otherwise unused va_ctime and va_nblocks fields.
+ * creation time, generation number, and dnode slot count. The
+ * generic VOP_CREATE() has no concept of these attributes, so
+ * we smuggle the values inside * the vattr's otherwise unused
+ * va_ctime, va_nblocks, and va_nlink fields.
shouldn't this comment include `va_fsid` or should the code below be using
`va_nlink` instead of `va_fsid`?
> + } else if (ds && ds->ds_feature_inuse[SPA_FEATURE_LARGE_DNODE]) {
+ /*
+ * For large_dnode datasets, scan from the beginning of the
+ * dnode block to find the starting offset. This is needed
+ * because objectp could be part of a large dnode so we can't
+ * assume it's a hole even if dmu_object_info() returns ENOENT.
+ */
+ int epb = DNODE_BLOCK_SIZE >> DNODE_SHIFT;
+ int skip;
+ uint64_t i;
+
+ for (i = *objectp & ~(epb - 1); i <= *objectp; i += skip) {
+ dmu_object_info_t doi;
+
+ error = dmu_object_info(os, i, &doi);
+ if (error)
NIT: error != 0
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/409#pullrequestreview-57301052
------------------------------------------
openzfs-developer
Archives:
https://openzfs.topicbox.com/groups/developer/discussions/Tfefe6318017dd4c7-Mccb2ecbc27ed810810878cf9
Powered by Topicbox: https://topicbox.com