Deleted Added
full compact
vdev_cache.c (185029) vdev_cache.c (208047)
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

--- 265 unchanged lines hidden (view full) ---

274 return (EINVAL);
275
276 if (zio->io_size > zfs_vdev_cache_max)
277 return (EOVERFLOW);
278
279 /*
280 * If the I/O straddles two or more cache blocks, don't cache it.
281 */
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

--- 265 unchanged lines hidden (view full) ---

274 return (EINVAL);
275
276 if (zio->io_size > zfs_vdev_cache_max)
277 return (EOVERFLOW);
278
279 /*
280 * If the I/O straddles two or more cache blocks, don't cache it.
281 */
282 if (P2CROSS(zio->io_offset, zio->io_offset + zio->io_size - 1, VCBS))
282 if (P2BOUNDARY(zio->io_offset, zio->io_size, VCBS))
283 return (EXDEV);
284
285 ASSERT(cache_phase + zio->io_size <= VCBS);
286
287 mutex_enter(&vc->vc_lock);
288
289 ve_search.ve_offset = cache_offset;
290 ve = avl_find(&vc->vc_offset_tree, &ve_search, NULL);

--- 147 unchanged lines hidden ---
283 return (EXDEV);
284
285 ASSERT(cache_phase + zio->io_size <= VCBS);
286
287 mutex_enter(&vc->vc_lock);
288
289 ve_search.ve_offset = cache_offset;
290 ve = avl_find(&vc->vc_offset_tree, &ve_search, NULL);

--- 147 unchanged lines hidden ---