From owner-svn-src-stable-12@freebsd.org Thu Mar 14 10:03:05 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8C54153BA07; Thu, 14 Mar 2019 10:03:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3D26FD9A; Thu, 14 Mar 2019 10:03:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DDC520E0E; Thu, 14 Mar 2019 10:03:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2EA35VD068952; Thu, 14 Mar 2019 10:03:05 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2EA340p068950; Thu, 14 Mar 2019 10:03:04 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201903141003.x2EA340p068950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 14 Mar 2019 10:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345128 - in stable/12: sbin/camcontrol stand/libsa/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: smh X-SVN-Commit-Paths: in stable/12: sbin/camcontrol stand/libsa/zfs X-SVN-Commit-Revision: 345128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5B3D26FD9A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 10:03:06 -0000 Author: smh Date: Thu Mar 14 10:03:04 2019 New Revision: 345128 URL: https://svnweb.freebsd.org/changeset/base/345128 Log: MFC r344701: Fix incorrect / unused sector_count for identify requests Fix unused sector_count for identify requests from camcontrol by changing to zero which is a more appropriate value when the parameter is unused. Sponsored by: Multiplay Modified: stable/12/sbin/camcontrol/camcontrol.c stable/12/stand/libsa/zfs/zfsimpl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/12/sbin/camcontrol/camcontrol.c Thu Mar 14 09:18:54 2019 (r345127) +++ stable/12/sbin/camcontrol/camcontrol.c Thu Mar 14 10:03:04 2019 (r345128) @@ -2292,7 +2292,7 @@ ata_do_identify(struct cam_device *device, int retry_c /*command*/command, /*features*/0, /*lba*/0, - /*sector_count*/(u_int8_t)sizeof(struct ata_params), + /*sector_count*/0, /*data_ptr*/(u_int8_t *)ptr, /*dxfer_len*/sizeof(struct ata_params), /*timeout*/timeout ? timeout : 30 * 1000, @@ -2312,8 +2312,7 @@ ata_do_identify(struct cam_device *device, int retry_c /*command*/retry_command, /*features*/0, /*lba*/0, - /*sector_count*/(u_int8_t) - sizeof(struct ata_params), + /*sector_count*/0, /*data_ptr*/(u_int8_t *)ptr, /*dxfer_len*/sizeof(struct ata_params), /*timeout*/timeout ? timeout : 30 * 1000, Modified: stable/12/stand/libsa/zfs/zfsimpl.c ============================================================================== --- stable/12/stand/libsa/zfs/zfsimpl.c Thu Mar 14 09:18:54 2019 (r345127) +++ stable/12/stand/libsa/zfs/zfsimpl.c Thu Mar 14 10:03:04 2019 (r345128) @@ -2076,6 +2076,7 @@ zfs_mount_dataset(const spa_t *spa, uint64_t objnum, o { dnode_phys_t dataset; dsl_dataset_phys_t *ds; + int err; if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); @@ -2083,9 +2084,9 @@ zfs_mount_dataset(const spa_t *spa, uint64_t objnum, o } ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; - if (zio_read(spa, &ds->ds_bp, objset)) { - printf("ZFS: can't read object set for dataset %ju\n", - (uintmax_t)objnum); + if ((err = zio_read(spa, &ds->ds_bp, objset)) != 0) { + printf("ZFS: can't read object set for dataset %ju (error %d)\n", + (uintmax_t)objnum, err); return (EIO); }