Date: Tue, 16 Sep 2014 17:47:13 +0000 (UTC) From: Steven Hartland <smh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271683 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201409161747.s8GHlD4M093264@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: smh Date: Tue Sep 16 17:47:13 2014 New Revision: 271683 URL: http://svnweb.freebsd.org/changeset/base/271683 Log: MFC 265253: Don't treat TRIM requests returning ENOTSUP as an unexpected error Approved by: re (gjb) Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Sep 16 17:42:37 2014 (r271682) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Sep 16 17:47:13 2014 (r271683) @@ -2738,7 +2738,10 @@ zio_vdev_io_done(zio_t *zio) zio->io_error = zio_handle_label_injection(zio, EIO); if (zio->io_error) { - if (!vdev_accessible(vd, zio)) { + if (zio->io_error == ENOTSUP && + zio->io_type == ZIO_TYPE_FREE) { + /* Not all devices support TRIM. */ + } else if (!vdev_accessible(vd, zio)) { zio->io_error = SET_ERROR(ENXIO); } else { unexpected_error = B_TRUE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409161747.s8GHlD4M093264>