1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- 10 unchanged lines hidden (view full) ---
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
24 * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
25 */
26
27#include <sys/sysmacros.h>
28#include <sys/zfs_context.h>
29#include <sys/fm/fs/zfs.h>
30#include <sys/spa.h>
31#include <sys/txg.h>
32#include <sys/spa_impl.h>
33#include <sys/vdev_impl.h>
34#include <sys/zio_impl.h>
35#include <sys/zio_compress.h>
--- 111 unchanged lines hidden (view full) ---
147 * for each quarter-power of 2.
148 */
149 for (c = 0; c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; c++) {
150 size_t size = (c + 1) << SPA_MINBLOCKSHIFT;
151 size_t p2 = size;
152 size_t align = 0;
153 size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0;
154
155 while (!ISP2(p2))
156 p2 &= p2 - 1;
157
158#ifdef illumos
159#ifndef _KERNEL
160 /*
161 * If we are using watchpoints, put each buffer on its own page,
162 * to eliminate the performance overhead of trapping to the
163 * kernel when modifying a non-watched buffer that shares the
--- 3247 unchanged lines hidden ---
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
--- 10 unchanged lines hidden (view full) ---
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
24 * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
25 */
26
27#include <sys/sysmacros.h>
28#include <sys/zfs_context.h>
29#include <sys/fm/fs/zfs.h>
30#include <sys/spa.h>
31#include <sys/txg.h>
32#include <sys/spa_impl.h>
33#include <sys/vdev_impl.h>
34#include <sys/zio_impl.h>
35#include <sys/zio_compress.h>
--- 111 unchanged lines hidden (view full) ---
147 * for each quarter-power of 2.
148 */
149 for (c = 0; c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; c++) {
150 size_t size = (c + 1) << SPA_MINBLOCKSHIFT;
151 size_t p2 = size;
152 size_t align = 0;
153 size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0;
154
155 while (!ISP2(p2))
156 p2 &= p2 - 1;
157
158#ifdef illumos
159#ifndef _KERNEL
160 /*
161 * If we are using watchpoints, put each buffer on its own page,
162 * to eliminate the performance overhead of trapping to the
163 * kernel when modifying a non-watched buffer that shares the
--- 3247 unchanged lines hidden ---