Mercurial > illumos > illumos-gate
changeset 3357:83f85893a85b
6448515 "panic: divide by zero" in ssd_get_physical_geometry
author | yl194034 |
---|---|
date | Wed, 03 Jan 2007 20:44:57 -0800 |
parents | f56db5cb3b0e |
children | 52216832b03e |
files | usr/src/uts/common/io/scsi/targets/sd.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/targets/sd.c Wed Jan 03 15:16:33 2007 -0800 +++ b/usr/src/uts/common/io/scsi/targets/sd.c Wed Jan 03 20:44:57 2007 -0800 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -1200,12 +1200,13 @@ static void sd_convert_geometry(uint64_t capacity, struct dk_geom *un_g); #endif -static void sd_resync_geom_caches(struct sd_lun *un, int capacity, int lbasize, - int path_flag); +static void sd_resync_geom_caches(struct sd_lun *un, uint64_t capacity, + int lbasize, int path_flag); static int sd_read_fdisk(struct sd_lun *un, uint_t capacity, int lbasize, int path_flag); static void sd_get_physical_geometry(struct sd_lun *un, - struct geom_cache *pgeom_p, int capacity, int lbasize, int path_flag); + struct geom_cache *pgeom_p, uint64_t capacity, int lbasize, + int path_flag); static void sd_get_virtual_geometry(struct sd_lun *un, int capacity, int lbasize); static int sd_uselabel(struct sd_lun *un, struct dk_label *l, int path_flag); @@ -4350,7 +4351,7 @@ int label_error = 0; int gvalid = un->un_f_geometry_is_valid; int lbasize; - uint_t capacity; + uint64_t capacity; int count; #if defined(__i386) || defined(__amd64) int forced_under_1t = 0; @@ -4775,7 +4776,7 @@ */ static void -sd_resync_geom_caches(struct sd_lun *un, int capacity, int lbasize, +sd_resync_geom_caches(struct sd_lun *un, uint64_t capacity, int lbasize, int path_flag) { struct geom_cache pgeom; @@ -5114,7 +5115,7 @@ static void sd_get_physical_geometry(struct sd_lun *un, struct geom_cache *pgeom_p, - int capacity, int lbasize, int path_flag) + uint64_t capacity, int lbasize, int path_flag) { struct mode_format *page3p; struct mode_geometry *page4p;