diff options
| author | Matthew Ahrens <mahrens@delphix.com> | 2013-03-08 10:41:28 -0800 |
|---|---|---|
| committer | Christopher Siden <chris.siden@delphix.com> | 2013-03-08 10:52:11 -0800 |
| commit | be6fd75a69ae679453d9cda5bff3326111e6d1ca (patch) | |
| tree | c161b04b371d3e998e4d4df64e3bc1d256290550 /usr/src/uts/common/fs/zfs/vdev_cache.c | |
| parent | efb4a871d8fd510a833bdca610528dde5ed69e42 (diff) | |
| download | illumos-joyent-be6fd75a69ae679453d9cda5bff3326111e6d1ca.tar.gz | |
3598 want to dtrace when errors are generated in zfs
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/fs/zfs/vdev_cache.c')
| -rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_cache.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/zfs/vdev_cache.c b/usr/src/uts/common/fs/zfs/vdev_cache.c index 77f8116eff..be2a9992c1 100644 --- a/usr/src/uts/common/fs/zfs/vdev_cache.c +++ b/usr/src/uts/common/fs/zfs/vdev_cache.c @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ #include <sys/zfs_context.h> #include <sys/spa.h> @@ -259,16 +262,16 @@ vdev_cache_read(zio_t *zio) ASSERT(zio->io_type == ZIO_TYPE_READ); if (zio->io_flags & ZIO_FLAG_DONT_CACHE) - return (EINVAL); + return (SET_ERROR(EINVAL)); if (zio->io_size > zfs_vdev_cache_max) - return (EOVERFLOW); + return (SET_ERROR(EOVERFLOW)); /* * If the I/O straddles two or more cache blocks, don't cache it. */ if (P2BOUNDARY(zio->io_offset, zio->io_size, VCBS)) - return (EXDEV); + return (SET_ERROR(EXDEV)); ASSERT(cache_phase + zio->io_size <= VCBS); @@ -280,7 +283,7 @@ vdev_cache_read(zio_t *zio) if (ve != NULL) { if (ve->ve_missed_update) { mutex_exit(&vc->vc_lock); - return (ESTALE); + return (SET_ERROR(ESTALE)); } if ((fio = ve->ve_fill_io) != NULL) { @@ -303,7 +306,7 @@ vdev_cache_read(zio_t *zio) if (ve == NULL) { mutex_exit(&vc->vc_lock); - return (ENOMEM); + return (SET_ERROR(ENOMEM)); } fio = zio_vdev_delegated_io(zio->io_vd, cache_offset, |
