/titanic_41/usr/src/uts/common/fs/zfs/ |
H A D | vdev.c | 93 vdev_default_asize(vdev_t *vd, uint64_t psize) in vdev_default_asize() argument 95 uint64_t asize = P2ROUNDUP(psize, 1ULL << vd->vdev_top->vdev_ashift); in vdev_default_asize() 98 for (int c = 0; c < vd->vdev_children; c++) { in vdev_default_asize() 99 csize = vdev_psize_to_asize(vd->vdev_child[c], psize); in vdev_default_asize() 113 vdev_get_min_asize(vdev_t *vd) in vdev_get_min_asize() argument 115 vdev_t *pvd = vd->vdev_parent; in vdev_get_min_asize() 122 return (vd->vdev_asize); in vdev_get_min_asize() 128 if (vd == vd->vdev_top) in vdev_get_min_asize() 129 return (P2ALIGN(vd->vdev_asize, 1ULL << vd->vdev_ms_shift)); in vdev_get_min_asize() 142 vdev_set_min_asize(vdev_t *vd) in vdev_set_min_asize() argument [all …]
|
H A D | vdev_label.c | 182 vdev_label_read(zio_t *zio, vdev_t *vd, int l, void *buf, uint64_t offset, in vdev_label_read() argument 189 zio_nowait(zio_read_phys(zio, vd, in vdev_label_read() 190 vdev_label_offset(vd->vdev_psize, l, offset), in vdev_label_read() 196 vdev_label_write(zio_t *zio, vdev_t *vd, int l, void *buf, uint64_t offset, in vdev_label_write() argument 205 zio_nowait(zio_write_phys(zio, vd, in vdev_label_write() 206 vdev_label_offset(vd->vdev_psize, l, offset), in vdev_label_write() 215 vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats, in vdev_config_generate() argument 222 fnvlist_add_string(nv, ZPOOL_CONFIG_TYPE, vd->vdev_ops->vdev_op_type); in vdev_config_generate() 224 fnvlist_add_uint64(nv, ZPOOL_CONFIG_ID, vd->vdev_id); in vdev_config_generate() 225 fnvlist_add_uint64(nv, ZPOOL_CONFIG_GUID, vd->vdev_guid); in vdev_config_generate() [all …]
|
H A D | vdev_disk.c | 53 vdev_disk_alloc(vdev_t *vd) in vdev_disk_alloc() argument 57 dvd = vd->vdev_tsd = kmem_zalloc(sizeof (vdev_disk_t), KM_SLEEP); in vdev_disk_alloc() 66 vdev_disk_free(vdev_t *vd) in vdev_disk_free() argument 68 vdev_disk_t *dvd = vd->vdev_tsd; in vdev_disk_free() 85 vd->vdev_tsd = NULL; in vdev_disk_free() 93 vdev_t *vd = (vdev_t *)arg; in vdev_disk_off_notify() local 94 vdev_disk_t *dvd = vd->vdev_tsd; in vdev_disk_off_notify() 111 vdev_disk_close(vd); in vdev_disk_off_notify() 117 zfs_post_remove(vd->vdev_spa, vd); in vdev_disk_off_notify() 118 vd->vdev_remove_wanted = B_TRUE; in vdev_disk_off_notify() [all …]
|
H A D | vdev_root.c | 50 too_many_errors(vdev_t *vd, int numerrors) in too_many_errors() argument 52 ASSERT3U(numerrors, <=, vd->vdev_children); in too_many_errors() 57 vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, in vdev_root_open() argument 63 if (vd->vdev_children == 0) { in vdev_root_open() 64 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL; in vdev_root_open() 68 vdev_open_children(vd); in vdev_root_open() 70 for (int c = 0; c < vd->vdev_children; c++) { in vdev_root_open() 71 vdev_t *cvd = vd->vdev_child[c]; in vdev_root_open() 79 if (too_many_errors(vd, numerrors)) { in vdev_root_open() 80 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS; in vdev_root_open() [all …]
|
H A D | vdev_file.c | 40 vdev_file_hold(vdev_t *vd) in vdev_file_hold() argument 42 ASSERT(vd->vdev_path != NULL); in vdev_file_hold() 46 vdev_file_rele(vdev_t *vd) in vdev_file_rele() argument 48 ASSERT(vd->vdev_path != NULL); in vdev_file_rele() 52 vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize, in vdev_file_open() argument 63 if (vd->vdev_path == NULL || vd->vdev_path[0] != '/') { in vdev_file_open() 64 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL; in vdev_file_open() 72 if (vd->vdev_tsd != NULL) { in vdev_file_open() 73 ASSERT(vd->vdev_reopening); in vdev_file_open() 74 vf = vd->vdev_tsd; in vdev_file_open() [all …]
|
H A D | zfs_fm.c | 107 const char *subclass, spa_t *spa, vdev_t *vd, zio_t *zio, in zfs_ereport_start() argument 157 if (vd != NULL) { in zfs_ereport_start() 167 if (zio->io_vd == vd && !vdev_accessible(vd, zio)) in zfs_ereport_start() 176 vd->vdev_ops->vdev_op_leaf && in zfs_ereport_start() 177 vdev_dtl_contains(vd, DTL_MISSING, zio->io_txg, 1)) in zfs_ereport_start() 186 if (vd != NULL && in zfs_ereport_start() 188 (vd->vdev_remove_wanted || vd->vdev_state == VDEV_STATE_REMOVED)) in zfs_ereport_start() 229 vd != NULL ? vd->vdev_guid : 0); in zfs_ereport_start() 257 if (vd != NULL) { in zfs_ereport_start() 258 vdev_t *pvd = vd->vdev_parent; in zfs_ereport_start() [all …]
|
H A D | spa.c | 1208 vdev_t *vd; in spa_config_parse() local 1209 if ((error = spa_config_parse(spa, &vd, child[c], *vdp, c, in spa_config_parse() 1333 vdev_t *vd, *tvd; in spa_load_spares() local 1341 vd = spa->spa_spares.sav_vdevs[i]; in spa_load_spares() 1344 if ((tvd = spa_lookup_by_guid(spa, vd->vdev_guid, in spa_load_spares() 1347 vdev_close(vd); in spa_load_spares() 1348 vdev_free(vd); in spa_load_spares() 1379 VERIFY(spa_config_parse(spa, &vd, spares[i], NULL, 0, in spa_load_spares() 1381 ASSERT(vd != NULL); in spa_load_spares() 1383 spa->spa_spares.sav_vdevs[i] = vd; in spa_load_spares() [all …]
|
H A D | metaslab.c | 218 vdev_t *vd; in metaslab_class_validate() local 230 vd = mg->mg_vd; in metaslab_class_validate() 231 ASSERT(vd->vdev_mg != NULL); in metaslab_class_validate() 232 ASSERT3P(vd->vdev_top, ==, vd); in metaslab_class_validate() 234 ASSERT3P(vd->vdev_ops, !=, &vdev_hole_ops); in metaslab_class_validate() 428 vdev_t *vd = mg->mg_vd; in metaslab_group_alloc_update() local 430 vdev_stat_t *vs = &vd->vdev_stat; in metaslab_group_alloc_update() 433 ASSERT(vd == vd->vdev_top); in metaslab_group_alloc_update() 475 metaslab_group_create(metaslab_class_t *mc, vdev_t *vd) in metaslab_group_create() argument 483 mg->mg_vd = vd; in metaslab_group_create() [all …]
|
/titanic_41/usr/src/uts/sun4v/io/ |
H A D | vds.c | 218 (vd->dring + (i)*vd->descriptor_size)) 221 #define VD_CLIENT(vd) \ argument 222 (((vd)->xfer_mode == VIO_DESC_MODE) ? "in-band client" : \ 223 (((vd)->xfer_mode == VIO_DRING_MODE_V1_0) ? "dring client" : \ 224 (((vd)->xfer_mode == 0) ? "null client" : \ 228 #define VD_DSKIMG_LABEL_READ(vd, labelp) \ argument 229 vd_dskimg_rw(vd, VD_SLICE_NONE, VD_OP_BREAD, (caddr_t)labelp, \ 233 #define VD_DSKIMG_LABEL_WRITE(vd, labelp) \ argument 234 vd_dskimg_rw(vd, VD_SLICE_NONE, VD_OP_BWRITE, (caddr_t)labelp, \ 238 #define VD_DSKIMG(vd) ((vd)->vdisk_type == VD_DISK_TYPE_DISK && \ argument [all …]
|
/titanic_41/usr/src/lib/libast/common/vmalloc/ |
H A D | vmpool.c | 49 reg Vmdata_t* vd = vm->data; local 57 if(size != vd->pool) 58 { if(vd->pool <= 0) 59 vd->pool = size; 63 SETINUSE(vd, inuse); 64 if(!(local = vd->mode&VM_TRUST) ) 65 { GETLOCAL(vd,local); 66 if(ISLOCK(vd, local)) 67 { CLRINUSE(vd, inuse); 70 SETLOCK(vd, local); [all …]
|
H A D | vmlast.c | 46 reg Vmdata_t* vd = vm->data; local 50 SETINUSE(vd, inuse); 51 if(!(local = vd->mode&VM_TRUST)) 52 { GETLOCAL(vd,local); 53 if(ISLOCK(vd,local)) 54 { CLRINUSE(vd, inuse); 57 SETLOCK(vd,local); 63 { for(last = NIL(Seg_t*), seg = vd->seg; seg; last = seg, seg = seg->next) 68 seg->next = vd->seg; 69 vd->seg = seg; [all …]
|
H A D | vmbest.c | 93 static int vmisfree(Vmdata_t* vd, Block_t* b) in vmisfree() argument 95 static int vmisfree(vd,b) in vmisfree() 96 Vmdata_t* vd; in vmisfree() 103 if(b == vd->wild) 107 return vmonlist(TINY(vd)[INDEX(SIZE(b))], b); 109 if(vd->root) 110 return vmintree(vd->root, b); 117 static int vmisjunk(Vmdata_t* vd, Block_t* b) in vmisjunk() argument 119 static int vmisjunk(vd,b) in vmisjunk() 120 Vmdata_t* vd; in vmisjunk() [all …]
|
H A D | vmprivate.c | 51 reg Vmdata_t* vd = vm->data; local 58 if(!_Vmtrace && vm == Vmheap && (vd->mode&VM_TRUST) ) 62 if(vd->incr <= 0) /* this is just _Vmheap on the first call */ 63 vd->incr = VMHEAPINCR; 69 if((size = ROUND(s,vd->incr)) < s) 73 if(size > 2*vd->incr && vm->disc->round < vd->incr) 74 vd->incr *= 2; 77 if(!(seg = vd->seg) ) 80 { if(!vd->wild || SEG(vd->wild) != seg) 83 { s = SIZE(vd->wild) + sizeof(Head_t); [all …]
|
H A D | vmclear.c | 45 reg Vmdata_t* vd = vm->data; local 48 SETINUSE(vd, inuse); 49 if(!(vd->mode&VM_TRUST) ) 50 { if(ISLOCK(vd,0)) 51 { CLRINUSE(vd, inuse); 54 SETLOCK(vd,0); 57 vd->free = vd->wild = NIL(Block_t*); 58 vd->pool = 0; 60 if(vd->mode&(VM_MTBEST|VM_MTDEBUG|VM_MTPROFILE) ) 61 { vd->root = NIL(Block_t*); [all …]
|
H A D | vmset.c | 45 reg Vmdata_t* vd = vm->data; local 48 return vd->mode; 50 SETINUSE(vd, inuse); 51 if(!(vd->mode&VM_TRUST) ) 52 { if(ISLOCK(vd,0)) 53 { CLRINUSE(vd, inuse); 56 SETLOCK(vd,0); 59 mode = vd->mode; 62 vd->mode |= (flags&VM_FLAGS); 63 else vd->mode &= ~(flags&VM_FLAGS); [all …]
|
H A D | vmstat.c | 46 reg Vmdata_t* vd = vm ? vm->data : Vmregion->data; local 49 SETINUSE(vd, inuse); 51 { CLRINUSE(vd, inuse); 54 if(!(vd->mode&VM_TRUST)) 55 { if(ISLOCK(vd,0)) 56 { CLRINUSE(vd, inuse); 59 SETLOCK(vd,0); 67 if(vd->mode&VM_MTLAST) 69 else if((vd->mode&VM_MTPOOL) && (s = vd->pool) > 0) 71 for(b = vd->free; b; b = SEGLINK(b)) [all …]
|
H A D | vmopen.c | 40 Vmdata_t vd; /* space for the region itself */ member 57 reg Vmdata_t* vd; local 90 vd = (Vmdata_t*)addr; 91 if((vd->mode&meth->meth) != 0) 92 { vm->data = vd; 119 vd = (Vmdata_t*)addr; 120 vd->mode = (mode&VM_FLAGS) | meth->meth; 121 vd->incr = incr; 122 vd->pool = 0; 123 vd->free = vd->wild = NIL(Block_t*); [all …]
|
H A D | vmdebug.c | 90 reg Vmdata_t* vd = vm->data; local 93 if(vd->mode&VM_DBABORT) 276 reg Vmdata_t* vd = vm->data; local 279 SETINUSE(vd, inuse); 280 GETLOCAL(vd,local); 281 if(ISLOCK(vd,local) || !addr) 282 { CLRINUSE(vd, inuse); 285 SETLOCK(vd,local); 288 for(seg = vd->seg; seg; seg = seg->next) 324 CLRLOCK(vd,local); [all …]
|
H A D | vmsegment.c | 44 reg Vmdata_t* vd = vm->data; local 47 SETINUSE(vd, inuse); 48 if(!(vd->mode&VM_TRUST)) 49 { if(ISLOCK(vd,0)) 50 { CLRINUSE(vd, inuse); 53 SETLOCK(vd,0); 56 for(seg = vd->seg; seg; seg = seg->next) 61 CLRLOCK(vd,0); 62 CLRINUSE(vd, inuse);
|
H A D | vmprofile.c | 476 reg Vmdata_t* vd = vm->data; local 479 SETINUSE(vd, inuse); 480 if(!(local = vd->mode&VM_TRUST) ) 481 { GETLOCAL(vd, local); 482 if(ISLOCK(vd, local)) 483 { CLRINUSE(vd, inuse); 486 SETLOCK(vd, local); 495 if(!local && (vd->mode&VM_TRACE) && _Vmtrace) 500 CLRLOCK(vd, local); 502 CLRINUSE(vd, inuse); [all …]
|
H A D | vmclose.c | 43 Vmdata_t* vd = vm->data; local 49 if(!(vd->mode&VM_TRUST) && ISLOCK(vd,0)) 57 vd->mode &= ~VM_TRUST; 58 SETLOCK(vd,0); 60 if((vd->mode&VM_MTPROFILE) && _Vmpfclose) 73 for(seg = vd->seg; seg; seg = next) 82 else CLRLOCK(vd,0);
|
/titanic_41/usr/src/uts/common/fs/zfs/sys/ |
H A D | vdev.h | 57 extern int vdev_validate_aux(vdev_t *vd); 58 extern zio_t *vdev_probe(vdev_t *vd, zio_t *pio); 60 extern boolean_t vdev_is_bootable(vdev_t *vd); 62 extern vdev_t *vdev_lookup_by_guid(vdev_t *vd, uint64_t guid); 64 extern void vdev_dtl_dirty(vdev_t *vd, vdev_dtl_type_t d, 66 extern boolean_t vdev_dtl_contains(vdev_t *vd, vdev_dtl_type_t d, 68 extern boolean_t vdev_dtl_empty(vdev_t *vd, vdev_dtl_type_t d); 69 extern void vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, 71 extern boolean_t vdev_dtl_required(vdev_t *vd); 72 extern boolean_t vdev_resilver_needed(vdev_t *vd, [all …]
|
H A D | vdev_impl.h | 59 typedef int vdev_open_func_t(vdev_t *vd, uint64_t *size, uint64_t *max_size, 61 typedef void vdev_close_func_t(vdev_t *vd); 62 typedef uint64_t vdev_asize_func_t(vdev_t *vd, uint64_t psize); 65 typedef void vdev_state_change_func_t(vdev_t *vd, int, int); 66 typedef void vdev_hold_func_t(vdev_t *vd); 67 typedef void vdev_rele_func_t(vdev_t *vd); 237 #define VDEV_UBERBLOCK_SHIFT(vd) \ argument 238 MIN(MAX((vd)->vdev_top->vdev_ashift, UBERBLOCK_SHIFT), \ 240 #define VDEV_UBERBLOCK_COUNT(vd) \ argument 241 (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT(vd)) [all …]
|
/titanic_41/usr/src/lib/libadm/common/ |
H A D | rdwr_vtoc.c | 47 #define libadm_vtoc_copy(vs, vd) \ argument 50 vd->v_bootinfo[0] = (unsigned)vs->v_bootinfo[0]; \ 51 vd->v_bootinfo[1] = (unsigned)vs->v_bootinfo[1]; \ 52 vd->v_bootinfo[2] = (unsigned)vs->v_bootinfo[2]; \ 53 vd->v_sanity = (unsigned)vs->v_sanity; \ 54 vd->v_version = (unsigned)vs->v_version; \ 55 bcopy(vs->v_volume, vd->v_volume, LEN_DKL_VVOL); \ 56 vd->v_sectorsz = vs->v_sectorsz; \ 57 vd->v_nparts = vs->v_nparts; \ 58 vd->v_version = (unsigned)vs->v_version; \ [all …]
|
/titanic_41/usr/src/uts/sun4v/sys/ |
H A D | vdsk_common.h | 542 #define VD_UPDATE_IO_STATS(vd, op, len) \ argument 544 ASSERT((vd) != NULL); \ 545 ASSERT(MUTEX_HELD(&(vd)->lock)); \ 547 if ((vd)->io_stats != NULL) { \ 548 kstat_io_t *kip = KSTAT_IO_PTR((vd)->io_stats); \ 565 #define VD_KSTAT_WAITQ_ENTER(vd) \ argument 566 if ((vd)->io_stats != NULL) { \ 567 ASSERT(MUTEX_HELD(&(vd)->lock)); \ 568 kstat_waitq_enter(KSTAT_IO_PTR((vd)->io_stats)); \ 571 #define VD_KSTAT_WAITQ_EXIT(vd) \ argument [all …]
|