From owner-svn-src-stable-10@FreeBSD.ORG Tue Sep 16 17:47:13 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1296CD; Tue, 16 Sep 2014 17:47:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9A91E4; Tue, 16 Sep 2014 17:47:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8GHlDgX093265; Tue, 16 Sep 2014 17:47:13 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8GHlD4M093264; Tue, 16 Sep 2014 17:47:13 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201409161747.s8GHlD4M093264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 16 Sep 2014 17:47:13 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2014 17:47:13 -0000 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;