Date: Sat, 3 May 2014 02:30:02 +0000 (UTC) From: Steven Hartland <smh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265253 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201405030230.s432U2dl088851@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: smh Date: Sat May 3 02:30:01 2014 New Revision: 265253 URL: http://svnweb.freebsd.org/changeset/base/265253 Log: Don't treat TRIM requests returning ENOTSUP as an unexpected error. MFC after: 1 month X-MFC-With: r265152 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Sat May 3 00:13:45 2014 (r265252) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Sat May 3 02:30:01 2014 (r265253) @@ -2674,7 +2674,10 @@ zio_vdev_io_done(zio_t **ziop) 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?201405030230.s432U2dl088851>