diff options
author | Rob Johnston <rob.johnston@joyent.com> | 2019-05-23 21:02:59 +0000 |
---|---|---|
committer | Gordon Ross <gwr@nexenta.com> | 2019-05-28 19:35:45 -0400 |
commit | 4a97b82e5d7af90029b0dc4e822c3b0b5e9bfa71 (patch) | |
tree | a31a87e76f8e6ca9ec5d55d29c42df4f3b766e0b /usr/src/lib/fm | |
parent | 2a2cfba00d7208e9a92d12f89a6a099b9c6d8c3a (diff) | |
download | illumos-gate-4a97b82e5d7af90029b0dc4e822c3b0b5e9bfa71.tar.gz |
11069 disk topo enumerator miscalculates disk capacity
Reviewed by: Jordan Hendricks <jordan.hendricks@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src/lib/fm')
-rw-r--r-- | usr/src/lib/fm/topo/modules/common/disk/disk_common.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c index 8088e79f02..260a4689ba 100644 --- a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c +++ b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2019, Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ /* @@ -773,8 +773,8 @@ dev_di_node_add(di_node_t node, char *devid, disk_cbdata_t *cbp) char *s; int64_t *nblocksp; uint64_t nblocks; - int *dblksizep; - uint_t dblksize; + int *blksizep; + uint_t blksize; char lentry[MAXPATHLEN]; int pathcount; int *inq_dtype, itype; @@ -1032,15 +1032,15 @@ dev_di_node_add(di_node_t node, char *devid, disk_cbdata_t *cbp) nblocks = (uint64_t)*nblocksp; /* * To save kernel memory, the driver may not define - * "device-dblksize" when its value is default DEV_BSIZE. + * "device-blksize" when its value is default DEV_BSIZE. */ if (di_prop_lookup_ints(DDI_DEV_T_ANY, node, - "device-dblksize", &dblksizep) > 0) - dblksize = (uint_t)*dblksizep; + "device-blksize", &blksizep) > 0) + blksize = (uint_t)*blksizep; else - dblksize = DEV_BSIZE; /* default value */ + blksize = DEV_BSIZE; /* default value */ (void) snprintf(lentry, sizeof (lentry), - "%" PRIu64, nblocks * dblksize); + "%" PRIu64, nblocks * blksize); if ((dnode->ddn_cap = topo_mod_strdup(mod, lentry)) == NULL) goto error; } |