Created
July 13, 2018 03:29
-
-
Save lundman/5c269ae5582bac1adf2a58e7b9513c1b to your computer and use it in GitHub Desktop.
Temporary kmem_cache_alloc work around
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/usr/src/uts/common/fs/zfs/arc.c b/usr/src/uts/common/fs/zfs/arc.c | |
index b2cc3bd..d714f60 100644 | |
--- a/usr/src/uts/common/fs/zfs/arc.c | |
+++ b/usr/src/uts/common/fs/zfs/arc.c | |
@@ -3713,6 +3713,13 @@ arc_hdr_realloc_crypt(arc_buf_hdr_t *hdr, boolean_t need_crypt) | |
} else { | |
arc_hdr_clear_flags(nhdr, ARC_FLAG_PROTECTED); | |
} | |
+ | |
+ // Due to lazy cons/dest in kmem_cache - clear it | |
+ hdr->b_l1hdr.b_acb = NULL; | |
+ hdr->b_l1hdr.b_pabd = NULL; | |
+ hdr->b_l1hdr.b_buf = NULL; | |
+ hdr->b_l1hdr.b_state = 0; | |
+ | |
buf_discard_identity(hdr); | |
kmem_cache_free(ocache, hdr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you need to close the comment in line 10 :)