svn commit: r286647 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Tue Aug 11 19:15:56 UTC 2015
Author: mav
Date: Tue Aug 11 19:15:55 2015
New Revision: 286647
URL: https://svnweb.freebsd.org/changeset/base/286647
Log:
Fix assertion panic caused by combination of r286598 and TRIM.
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 11 18:17:31 2015 (r286646)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 11 19:15:55 2015 (r286647)
@@ -2326,8 +2326,10 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr)
* want to re-destroy the header's L2 portion.
*/
if (HDR_HAS_L2HDR(hdr)) {
- trim_map_free(dev->l2ad_vdev, hdr->b_l2hdr.b_daddr,
- hdr->b_l2hdr.b_asize, 0);
+ if (hdr->b_l2hdr.b_daddr != L2ARC_ADDR_UNSET)
+ trim_map_free(dev->l2ad_vdev,
+ hdr->b_l2hdr.b_daddr,
+ hdr->b_l2hdr.b_asize, 0);
arc_hdr_l2hdr_destroy(hdr);
}
@@ -4412,8 +4414,10 @@ arc_release(arc_buf_t *buf, void *tag)
* to acquire the l2ad_mtx.
*/
if (HDR_HAS_L2HDR(hdr)) {
- trim_map_free(hdr->b_l2hdr.b_dev->l2ad_vdev,
- hdr->b_l2hdr.b_daddr, hdr->b_l2hdr.b_asize, 0);
+ if (hdr->b_l2hdr.b_daddr != L2ARC_ADDR_UNSET)
+ trim_map_free(hdr->b_l2hdr.b_dev->l2ad_vdev,
+ hdr->b_l2hdr.b_daddr,
+ hdr->b_l2hdr.b_asize, 0);
arc_hdr_l2hdr_destroy(hdr);
}
More information about the svn-src-all
mailing list