Lines Matching refs:capacity
291 static void cmlb_resync_geom_caches(struct cmlb_lun *cl, diskaddr_t capacity,
293 static int cmlb_read_fdisk(struct cmlb_lun *cl, diskaddr_t capacity,
298 static int cmlb_use_efi(struct cmlb_lun *cl, diskaddr_t capacity, int flags,
325 static void cmlb_convert_geometry(struct cmlb_lun *cl, diskaddr_t capacity,
602 * one bug in obtaining capacity (in sd):
605 * disks' capacity on x86 platform. And LBAs are addressed
623 * If capacity increasing by 1 causes disks' capacity
632 * sd uses (capacity -1) to calculate geometry;
636 * so that sd doesn't support a disk with capacity
661 * Assumes a default label based on capacity for non-removable devices.
662 * If capacity > 1TB, EFI is assumed otherwise VTOC (default VTOC
796 * EIO i/o errors during read or get capacity
1105 * Get capacity stored in EFI disk label.
1109 * capacity pointer to capacity stored in EFI disk label.
1116 * the label. If label is valid and is an EFI label, it stores the capacity
1117 * in disk label in the area pointed to by capacity.
1122 * EINVAL no valid EFI label or capacity is NULL.
1126 cmlb_efi_label_capacity(cmlb_handle_t cmlbhandle, diskaddr_t *capacity,
1143 if ((!cl->cl_f_geometry_is_valid) || (capacity == NULL) ||
1147 *capacity = (diskaddr_t)cl->cl_map[WD_NODE].dkl_nblk;
1376 * Description: If current capacity value is invalid, obtains the
1377 * current capacity from target driver.
1386 diskaddr_t capacity;
1395 status = DK_TG_GETCAP(cl, &capacity, tg_cookie);
1406 if ((capacity != 0) && (lbasize != 0)) {
1407 cl->cl_blockcount = capacity;
1622 diskaddr_t capacity;
1637 capacity = cl->cl_blockcount;
1647 * note if capacity > int32_max(1TB) we are in 64bit environment
1650 cl->cl_map[P0_RAW_DISK].dkl_nblk = capacity;
1657 cmlb_resync_geom_caches(cl, capacity, tg_cookie);
1660 label_error = cmlb_use_efi(cl, capacity, flags, tg_cookie);
1675 if (capacity > CMLB_EXTVTOC_LIMIT) {
1680 * capacity to be under 2TB in some earlier Solaris
1690 "capacity of the disk, use format(1M) to "
1723 rval = cmlb_read_fdisk(cl, capacity, tg_cookie);
1846 cmlb_convert_geometry(struct cmlb_lun *cl, diskaddr_t capacity,
1854 if (capacity < 160) {
1857 cl_g->dkg_ncyl = capacity;
1860 } else if (capacity <= 0x1000) {
1863 cl_g->dkg_nsect = capacity / (cl_g->dkg_nhead * cl_g->dkg_ncyl);
1869 * we assign based on capacity of the device. The algorithm is
1903 if (capacity <= 0x200000) {
1906 } else if (capacity <= 0x01000000) {
1934 cl_g->dkg_nsect = ((capacity +
1955 * capacity disk capacity in #blocks
1962 cmlb_resync_geom_caches(struct cmlb_lun *cl, diskaddr_t capacity,
2016 pgeomp->g_capacity = capacity;
2049 cmlb_dbg(CMLB_INFO, cl, " lbasize: %d; capacity: %ld; "
2367 * capacity disk capacity in #blocks
2378 cmlb_read_fdisk(struct cmlb_lun *cl, diskaddr_t capacity, void *tg_cookie)
2383 cl->cl_solaris_size = capacity;
2416 solaris_size = capacity;
2800 cmlb_use_efi(struct cmlb_lun *cl, diskaddr_t capacity, int flags,
2864 * capacity at this point could be based on CHS, so
2943 * if the disk capacity is expanded after disk is
2944 * labeled, minor number 7 represents the capacity
2952 * the disk capacity is not expanded.
2954 cl->cl_map[i].dkl_nblk = capacity;
2963 cl->cl_solaris_size = capacity;
2985 if ((capacity > CMLB_EXTVTOC_LIMIT) && (rval != ESRCH) && !iofailed) {
2996 * partition, vtoc, and capacity data) in the cmlb_lun struct.
3003 * partition, vtoc, and capacity data are good.
3006 * label; or computed capacity does not jibe with capacity
3142 /* Now look for a valid capacity. */
3156 * Force check here to ensure the computed capacity is valid.
3157 * If capacity is zero, it indicates an invalid label and
3163 "Corrupt label - no valid capacity could be "
3273 diskaddr_t capacity;
3305 * and number of sector per track, if the capacity <= 1GB, head = 64,
3306 * sect = 32. else head = 255, sect 63 Note: the capacity should be
3321 * capacity, it will become much shorter.
3423 * Before calculating geometry, capacity should be
3428 capacity = cl->cl_blockcount - 1;
3430 capacity = cl->cl_blockcount;
3433 cmlb_convert_geometry(cl, capacity, &cl_g, tg_cookie);
3454 * geometry, but instead use the entire capacity of the media.
5208 diskaddr_t capacity;
5213 capacity = cl->cl_blockcount;
5214 fdisk_rval = cmlb_read_fdisk(cl, capacity, tg_cookie);
5259 * if the capacity <= 1GB, head = 64, sect = 32.
5261 * Note: the capacity should be equal to C*H*S values.
5272 * with one based on capacity.
5285 /* do default setting, geometry based on capacity */
5388 diskaddr_t capacity;
5404 * copy the lbasize and capacity so that if they're
5409 capacity = cl->cl_blockcount;
5416 cmlb_resync_geom_caches(cl, capacity, tg_cookie);
5423 fdisk_rval = cmlb_read_fdisk(cl, capacity, tg_cookie);
5439 } else if (capacity < 0) {
5540 diskaddr_t capacity;
5595 capacity = cl->cl_blockcount - 1;
5597 capacity = cl->cl_blockcount;
5599 cmlb_convert_geometry(cl, capacity, dkgp, tg_cookie);
5601 dkgp->dkg_ncyl = capacity /
5712 diskaddr_t capacity;
5728 /* Pick up capacity and blocksize information. */
5729 capacity = cl->cl_blockcount;
5730 if (capacity == 0)
5782 *((uint64_t *)buffer) = capacity;