aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2018-04-09 14:24:46 -0700
committerBrian Behlendorf <[email protected]>2018-04-09 14:24:46 -0700
commit4f301661dfe7e90574ad634f8b7fe8da7e6b4064 (patch)
treeb68c6ff4d5177d5d26092e601f16d48c0aaf7b14 /include/sys
parent3b0d99289a8e473b059605a83d4ce0bd505ec3d3 (diff)
Revert "Handle zap_add() failures in mixed ... "
This reverts commit cc63068e95ee725cce03b1b7ce50179825a6cda5. Under certain circumstances this change can result in an ENOSPC error when adding new files to a directory. See #7401 for full details. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Issue #7401 Cloes #7416
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/zap_leaf.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/sys/zap_leaf.h b/include/sys/zap_leaf.h
index a3da1036a..e784c5963 100644
--- a/include/sys/zap_leaf.h
+++ b/include/sys/zap_leaf.h
@@ -46,15 +46,10 @@ struct zap_stats;
* block size (1<<l->l_bs) - hash entry size (2) * number of hash
* entries - header space (2*chunksize)
*/
-#define ZAP_LEAF_NUMCHUNKS_BS(bs) \
- (((1<<(bs)) - 2*ZAP_LEAF_HASH_NUMENTRIES_BS(bs)) / \
+#define ZAP_LEAF_NUMCHUNKS(l) \
+ (((1<<(l)->l_bs) - 2*ZAP_LEAF_HASH_NUMENTRIES(l)) / \
ZAP_LEAF_CHUNKSIZE - 2)
-#define ZAP_LEAF_NUMCHUNKS(l) (ZAP_LEAF_NUMCHUNKS_BS(((l)->l_bs)))
-
-#define ZAP_LEAF_NUMCHUNKS_DEF \
- (ZAP_LEAF_NUMCHUNKS_BS(fzap_default_block_shift))
-
/*
* The amount of space within the chunk available for the array is:
* chunk size - space for type (1) - space for next pointer (2)
@@ -79,10 +74,8 @@ struct zap_stats;
* which is less than block size / CHUNKSIZE (24) / minimum number of
* chunks per entry (3).
*/
-#define ZAP_LEAF_HASH_SHIFT_BS(bs) ((bs) - 5)
-#define ZAP_LEAF_HASH_NUMENTRIES_BS(bs) (1 << ZAP_LEAF_HASH_SHIFT_BS(bs))
-#define ZAP_LEAF_HASH_SHIFT(l) (ZAP_LEAF_HASH_SHIFT_BS(((l)->l_bs)))
-#define ZAP_LEAF_HASH_NUMENTRIES(l) (ZAP_LEAF_HASH_NUMENTRIES_BS(((l)->l_bs)))
+#define ZAP_LEAF_HASH_SHIFT(l) ((l)->l_bs - 5)
+#define ZAP_LEAF_HASH_NUMENTRIES(l) (1 << ZAP_LEAF_HASH_SHIFT(l))
/*
* The chunks start immediately after the hash table. The end of the