Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2019 10:03:04 +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-12@freebsd.org
Subject:   svn commit: r345128 - in stable/12: sbin/camcontrol stand/libsa/zfs
Message-ID:  <201903141003.x2EA340p068950@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903141003.x2EA340p068950>