summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dmu_object.c2
-rw-r--r--module/zfs/dnode.c12
-rw-r--r--module/zfs/zfs_replay.c6
3 files changed, 16 insertions, 4 deletions
diff --git a/module/zfs/dmu_object.c b/module/zfs/dmu_object.c
index 14264ec30..38ce6746e 100644
--- a/module/zfs/dmu_object.c
+++ b/module/zfs/dmu_object.c
@@ -318,7 +318,7 @@ dmu_object_next(objset_t *os, uint64_t *objectp, boolean_t hole, uint64_t txg)
dmu_object_info_t doi;
error = dmu_object_info(os, i, &doi);
- if (error)
+ if (error != 0)
skip = 1;
else
skip = doi.doi_dnodesize >> DNODE_SHIFT;
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c
index 9942d6427..8b3ec3aab 100644
--- a/module/zfs/dnode.c
+++ b/module/zfs/dnode.c
@@ -1176,6 +1176,18 @@ dnode_rele_slots(dnode_children_t *children, int idx, int slots)
}
/*
+ * When the DNODE_MUST_BE_FREE flag is set, the "slots" parameter is used
+ * to ensure the hole at the specified object offset is large enough to
+ * hold the dnode being created. The slots parameter is also used to ensure
+ * a dnode does not span multiple dnode blocks. In both of these cases, if
+ * a failure occurs, ENOSPC is returned. Keep in mind, these failure cases
+ * are only possible when using DNODE_MUST_BE_FREE.
+ *
+ * If the DNODE_MUST_BE_ALLOCATED flag is set, "slots" must be 0.
+ * dnode_hold_impl() will check if the requested dnode is already consumed
+ * as an extra dnode slot by an large dnode, in which case it returns
+ * ENOENT.
+ *
* errors:
* EINVAL - invalid object number.
* ENOSPC - hole too small to fulfill "slots" request
diff --git a/module/zfs/zfs_replay.c b/module/zfs/zfs_replay.c
index 30efb4b57..c2a9a8fde 100644
--- a/module/zfs/zfs_replay.c
+++ b/module/zfs/zfs_replay.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 Cyril Plisko. All rights reserved.
- * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2013, 2017 by Delphix. All rights reserved.
*/
#include <sys/types.h>
@@ -453,8 +453,8 @@ zfs_replay_create(zfsvfs_t *zfsvfs, lr_create_t *lr, boolean_t byteswap)
* eventually end up in zfs_mknode(), which assigns the object's
* creation time, generation number, and dnode slot count. The
* generic zfs_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.
+ * we smuggle the values inside the vattr's otherwise unused
+ * va_ctime, va_nblocks, and va_fsid fields.
*/
ZFS_TIME_DECODE(&xva.xva_vattr.va_ctime, lr->lr_crtime);
xva.xva_vattr.va_nblocks = lr->lr_gen;