diff options
author | Rob Johnston <rob.johnston@joyent.com> | 2019-05-23 21:02:59 +0000 |
---|---|---|
committer | Rob Johnston <rob.johnston@joyent.com> | 2019-05-23 22:08:30 +0000 |
commit | ab6a47af7ee9daefa937f7e8ca0531e68d003686 (patch) | |
tree | 84fc5fb84723937ba5e321e3f2dfd2a2763e3aaa /usr/src | |
parent | f55b95462694fef4b07880112eba7e5d6f88d3d4 (diff) | |
download | illumos-joyent-ab6a47af7ee9daefa937f7e8ca0531e68d003686.tar.gz |
OS-7808 disk topo enumerator miscalculates disk capacity
Reviewed by: Jordan Hendricks <jordan.hendricks@joyent.com>
Approved by: Jason King <jason.king@joyent.com>
Diffstat (limited to 'usr/src')
-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; } |