| /freebsd-src/contrib/bmake/unit-tests/ |
| H A D | hanoi-include.exp | 1 Move the upper disk from stack A to stack C. 2 Move the upper disk from stack A to stack B. 3 Move the upper disk from stack C to stack B. 4 Move the upper disk from stack A to stack C. 5 Move the upper disk from stack B to stack A. 6 Move the upper disk from stack B to stack C. 7 Move the upper disk from stack A to stack C. 8 Move the upper disk from stack A to stack B. 9 Move the upper disk from stack C to stack B. 10 Move the upper disk from stack C to stack A. [all …]
|
| /freebsd-src/contrib/netbsd-tests/sbin/gpt/ |
| H A D | t_gpt.sh | 35 disk=gpt.disk 75 silence dd conv=notrunc msgfmt=quiet if=/dev/zero of="$disk" "$@" 79 rm -f "$disk" 85 silence gpt create "$disk" 86 match "$(partaddmsg 1 34 1024)" gpt add -t efi -s 1024 "$disk" 87 match "$(partaddmsg 2 1058 9150)" gpt add "$disk" 92 file "$src/gpt.2part.show.normal" gpt show "$disk" 93 file "$src/gpt.2part.show.uuid" gpt show -u "$disk" 97 echo "^$disk: Partition $1 added: $uuid $2 $3\$" 101 echo "^$disk: Partition $1 resized: $2 $3\$" [all …]
|
| /freebsd-src/lib/libufs/ |
| H A D | type.c | 58 ufs_disk_close(struct uufsd *disk) in ufs_disk_close() argument 60 ERROR(disk, NULL); in ufs_disk_close() 61 close(disk->d_fd); in ufs_disk_close() 62 disk->d_fd = -1; in ufs_disk_close() 63 if (disk->d_mine & MINE_NAME) { in ufs_disk_close() 64 free((char *)(uintptr_t)disk->d_name); in ufs_disk_close() 65 disk->d_name = NULL; in ufs_disk_close() 67 if (disk->d_si != NULL) { in ufs_disk_close() 68 free(disk->d_si->si_csp); in ufs_disk_close() 69 free(disk->d_si); in ufs_disk_close() [all …]
|
| H A D | block.c | 32 #include <sys/disk.h> 52 bread(struct uufsd *disk, ufs2_daddr_t blockno, void *data, size_t size) in bread() argument 57 ERROR(disk, NULL); in bread() 61 ERROR(disk, "allocate bounce buffer"); in bread() 64 cnt = pread(disk->d_fd, p2, size, (off_t)(blockno * disk->d_bsize)); in bread() 66 ERROR(disk, "read error from block device"); in bread() 70 ERROR(disk, "end of file from block device"); in bread() 74 ERROR(disk, "short read or read error from block device"); in bread() 90 bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data, size_t size) in bwrite() argument 96 ERROR(disk, NULL); in bwrite() [all …]
|
| H A D | inode.c | 51 getinode(struct uufsd *disk, union dinodep *dp, ino_t inum) in getinode() argument 57 ERROR(disk, NULL); in getinode() 59 fs = &disk->d_fs; in getinode() 61 ERROR(disk, "inode number out of range"); in getinode() 64 inoblock = (caddr_t)&disk->d_inos[0]; in getinode() 65 min = disk->d_inomin; in getinode() 66 max = disk->d_inomax; in getinode() 70 bread(disk, fsbtodb(fs, ino_to_fsba(fs, inum)), inoblock, in getinode() 72 disk->d_inomin = min = inum - (inum % INOPB(fs)); in getinode() 73 disk->d_inomax = max = min + INOPB(fs); in getinode() [all …]
|
| H A D | cgroup.c | 51 cgballoc(struct uufsd *disk) in cgballoc() argument 58 fs = &disk->d_fs; in cgballoc() 59 cgp = &disk->d_cg; in cgballoc() 76 cgbfree(struct uufsd *disk, ufs2_daddr_t bno, long size) in cgbfree() argument 84 fs = &disk->d_fs; in cgbfree() 86 if (cgread1(disk, cg) != 1) in cgbfree() 88 cgp = &disk->d_cg; in cgbfree() 133 return cgwrite(disk); in cgbfree() 137 cgialloc(struct uufsd *disk) in cgialloc() argument 146 fs = &disk->d_fs; in cgialloc() [all …]
|
| H A D | sblock.c | 54 * The following option flags can be or'ed into disk->d_lookupflags: 64 sbread(struct uufsd *disk) in sbread() argument 69 error = sbget(disk->d_fd, &fs, disk->d_sblockloc, disk->d_lookupflags); in sbread() 70 return (handle_disk_read(disk, fs, error)); in sbread() 88 sbfind(struct uufsd *disk, int flags) in sbfind() argument 93 error = sbsearch(disk->d_fd, &fs, flags); in sbfind() 94 return (handle_disk_read(disk, fs, error)); in sbfind() 98 handle_disk_read(struct uufsd *disk, struct fs *fs, int error) in handle_disk_read() argument 101 ERROR(disk, NULL); in handle_disk_read() 105 ERROR(disk, "non-existent or truncated superblock"); in handle_disk_read() [all …]
|
| /freebsd-src/sys/geom/mirror/ |
| H A D | g_mirror.c | 113 static int g_mirror_update_disk(struct g_mirror_disk *disk, u_int state); 120 static void g_mirror_sync_reinit(const struct g_mirror_disk *disk, 122 static void g_mirror_sync_stop(struct g_mirror_disk *disk, int type); 166 g_mirror_get_diskname(struct g_mirror_disk *disk) in g_mirror_get_diskname() argument 169 if (disk->d_consumer == NULL || disk->d_consumer->provider == NULL) in g_mirror_get_diskname() 171 return (disk->d_name); in g_mirror_get_diskname() 191 struct g_mirror_disk *disk; in g_mirror_event_dispatch() local 196 disk = NULL; in g_mirror_event_dispatch() 199 disk in g_mirror_event_dispatch() 258 g_mirror_event_cancel(struct g_mirror_disk * disk) g_mirror_event_cancel() argument 290 struct g_mirror_disk *disk; g_mirror_ndisks() local 306 struct g_mirror_disk *disk; g_mirror_id2disk() local 404 g_mirror_connect_disk(struct g_mirror_disk * disk,struct g_provider * pp) g_mirror_connect_disk() argument 462 struct g_mirror_disk *disk; g_mirror_init_disk() local 509 g_mirror_destroy_disk(struct g_mirror_disk * disk) g_mirror_destroy_disk() argument 567 struct g_mirror_disk *disk; g_mirror_destroy_device() local 615 struct g_mirror_disk *disk; g_mirror_orphan() local 633 g_mirror_find_next(struct g_mirror_softc * sc,struct g_mirror_disk * disk) g_mirror_find_next() argument 652 struct g_mirror_disk *disk; g_mirror_get_disk() local 670 g_mirror_write_metadata(struct g_mirror_disk * disk,struct g_mirror_metadata * md) g_mirror_write_metadata() argument 729 g_mirror_clear_metadata(struct g_mirror_disk * disk) g_mirror_clear_metadata() argument 751 g_mirror_fill_metadata(struct g_mirror_softc * sc,struct g_mirror_disk * disk,struct g_mirror_metadata * md) g_mirror_fill_metadata() argument 786 g_mirror_update_metadata(struct g_mirror_disk * disk) g_mirror_update_metadata() argument 814 struct g_mirror_disk *disk; g_mirror_bump_syncid() local 837 struct g_mirror_disk *disk; g_mirror_bump_genid() local 860 struct g_mirror_disk *disk; g_mirror_idle() local 894 struct g_mirror_disk *disk; g_mirror_unidle() local 928 g_mirror_regular_request_error(struct g_mirror_softc * sc,struct g_mirror_disk * disk,struct bio * bp) g_mirror_regular_request_error() argument 960 struct g_mirror_disk *disk; g_mirror_regular_request() local 1109 struct g_mirror_disk *disk; g_mirror_candelete() local 1125 struct g_mirror_disk *disk; g_mirror_kernel_dump() local 1157 struct g_mirror_disk *disk; g_mirror_rotation_rate() local 1231 struct g_mirror_disk *disk; g_mirror_sync_collision() local 1344 g_mirror_sync_request_free(struct g_mirror_disk * disk,struct bio * bp) g_mirror_sync_request_free() argument 1369 struct g_mirror_disk *disk; g_mirror_sync_request() local 1510 struct g_mirror_disk *disk; g_mirror_request_prefer() local 1548 struct g_mirror_disk *disk; g_mirror_request_round_robin() local 1587 struct g_mirror_disk *disk, *dp; g_mirror_request_load() local 1644 struct g_mirror_disk *disk; g_mirror_request_split() local 1715 struct g_mirror_disk *disk; g_mirror_register_request() local 2075 g_mirror_update_idle(struct g_mirror_softc * sc,struct g_mirror_disk * disk) g_mirror_update_idle() argument 2095 g_mirror_sync_reinit(const struct g_mirror_disk * disk,struct bio * bp,off_t offset) g_mirror_sync_reinit() argument 2117 g_mirror_sync_start(struct g_mirror_disk * disk) g_mirror_sync_start() argument 2204 g_mirror_sync_stop(struct g_mirror_disk * disk,int type) g_mirror_sync_stop() argument 2243 struct g_mirror_disk *disk; g_mirror_launch_provider() local 2291 struct g_mirror_disk *disk; g_mirror_destroy_provider() local 2354 g_mirror_determine_state(struct g_mirror_disk * disk) g_mirror_determine_state() argument 2426 struct g_mirror_disk *disk; g_mirror_update_device() local 2696 g_mirror_update_disk(struct g_mirror_disk * disk,u_int state) g_mirror_update_disk() argument 3018 struct g_mirror_disk *disk; g_mirror_add_disk() local 3222 struct g_mirror_disk *disk; g_mirror_destroy() local 3385 struct g_mirror_disk *disk; g_mirror_resize() local 3433 struct g_mirror_disk *disk; g_mirror_dumpconf() local [all...] |
| /freebsd-src/share/man/man9/ |
| H A D | disk.9 | 32 .Nm disk 33 .Nd kernel disk storage API 39 .Fn disk_create "struct disk *disk" "int version" 41 .Fn disk_gone "struct disk *disk" 43 .Fn disk_destroy "struct disk *disk" 45 .Fn disk_resize "struct disk *disk" "int flags" 47 .Fn disk_add_alias "struct disk *disk" "const char *alias" 49 The disk storage API permits kernel device drivers providing access to 50 disk-like storage devices to advertise the device to other kernel 56 Each disk device is described by a [all …]
|
| /freebsd-src/tests/sys/cddl/zfs/tests/cli_root/zpool_create/ |
| H A D | zpool_create_007_neg.ksh | 54 if [[ -n $DISK ]]; then 55 disk=$DISK 57 disk=$DISK0 62 "-R $TESTDIR $TESTPOOL" "-m nodir $TESTPOOL $disk" \ 63 "-R nodir $TESTPOOL $disk" "-m nodir -R nodir $TESTPOOL $disk" \ 64 "-R nodir -m nodir $TESTPOOL $disk" "-R $TESTDIR -m nodir $TESTPOOL $disk" \ 65 "-R nodir -m $TESTDIR $TESTPOOL $disk" \ 70 "$TESTPOOL mirror c?t?d?" "$TESTPOOL mirror $disk c0t1d?" \ 71 "$TESTPOOL RAIDZ ${disk}p1 ${disk}p2" \ 72 "$TESTPOOL ${disk}p1 log ${disk}p2 \ [all …]
|
| /freebsd-src/sys/contrib/openzfs/tests/zfs-tests/include/ |
| H A D | blkdev.shlib | 25 # Returns SCSI host number for the given disk 27 function get_scsi_host #disk 29 typeset disk=$1 30 ls /sys/block/${disk}/device/scsi_device | cut -d : -f 1 134 function is_real_device #disk 136 typeset disk=$1 137 [[ -z $disk ]] && log_fail "No argument for disk given." 140 lsblk $DEV_RDSKDIR/$disk -o TYPE 2>/dev/null | \ 141 grep -q disk [all...] |
| /freebsd-src/tools/tools/bootparttest/ |
| H A D | bootparttest.c | 33 #include <disk.h> 55 .dv_name = "disk", 59 struct disk { struct 65 } disk; argument 80 ret = pread(disk.fd, buf, size, in disk_strategy() 81 (blk + dev->d_offset) * disk.sectorsize); in disk_strategy() 96 "<disk image file name>", argv[0]); in main() 97 memset(&disk, 0, sizeof(disk)); in main() 103 disk.fd = open(argv[1], O_RDONLY); in main() 104 if (disk.fd < 0) in main() [all …]
|
| /freebsd-src/sys/geom/raid3/ |
| H A D | g_raid3.c | 123 static int g_raid3_update_disk(struct g_raid3_disk *disk, u_int state); 173 g_raid3_get_diskname(struct g_raid3_disk *disk) in g_raid3_get_diskname() argument 176 if (disk->d_consumer == NULL || disk->d_consumer->provider == NULL) in g_raid3_get_diskname() 178 return (disk->d_name); in g_raid3_get_diskname() 296 struct g_raid3_disk *disk; in g_raid3_event_dispatch() local 301 disk = NULL; in g_raid3_event_dispatch() 304 disk = arg; in g_raid3_event_dispatch() 305 sc = disk->d_softc; in g_raid3_event_dispatch() 307 ep->e_disk = disk; in g_raid3_event_dispatch() 365 g_raid3_event_cancel(struct g_raid3_disk *disk) in g_raid3_event_cancel() argument [all …]
|
| /freebsd-src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_offline/ |
| H A D | zpool_offline_003_pos.ksh | 55 for disk in $DISKLIST; do 56 log_must zpool online $TESTPOOL $disk 57 log_must check_state $TESTPOOL $disk "online" 72 # Get name of the first disk in the pool 73 disk=${DISKLIST%% *} 77 # Force fault disk, and clear the fault 78 log_must zpool offline -$arg $TESTPOOL $disk 79 check_state $TESTPOOL $disk "faulted" 80 log_must zpool clear $TESTPOOL $disk 81 check_state $TESTPOOL $disk "online" [all …]
|
| /freebsd-src/sys/geom/concat/ |
| H A D | g_concat.c | 104 struct g_concat_disk *disk; in g_concat_nvalid() local 109 TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { in g_concat_nvalid() 110 if (disk->d_consumer != NULL) in g_concat_nvalid() 118 g_concat_remove_disk(struct g_concat_disk *disk) in g_concat_remove_disk() argument 124 KASSERT(disk->d_consumer != NULL, ("Non-valid disk in %s.", __func__)); in g_concat_remove_disk() 125 sc = disk->d_softc; in g_concat_remove_disk() 126 cp = disk->d_consumer; in g_concat_remove_disk() 128 if (!disk->d_removed) { in g_concat_remove_disk() 129 G_CONCAT_DEBUG(0, "Disk %s removed from %s.", in g_concat_remove_disk() 131 disk->d_removed = 1; in g_concat_remove_disk() [all …]
|
| /freebsd-src/sbin/bsdlabel/ |
| H A D | bsdlabel.8 | 40 .Ar disk | Fl f Ar file 46 .Ar disk | Fl f Ar file 53 .Ar disk | Fl f Ar file 60 .Ar disk | Fl f Ar file 84 label on a disk partition, or on a file containing a partition image. 88 .Ss Disk Device Name 110 that the program will operate on a file instead of a disk partition. 116 program right before the disk would have been modified, and displays 131 .Ss Reading the Disk Label 132 To examine the label on a disk driv [all...] |
| /freebsd-src/sys/geom/raid/ |
| H A D | md_jmicron.c | 206 * Generate fake Configuration ID based on disk IDs. 207 * Note: it will change after each disk set change. 357 struct g_raid_disk *disk; in g_raid_md_jmicron_get_disk() local 360 TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { in g_raid_md_jmicron_get_disk() 361 pd = (struct g_raid_md_jmicron_perdisk *)disk->d_md_data; in g_raid_md_jmicron_get_disk() 365 return (disk); in g_raid_md_jmicron_get_disk() 420 g_raid_md_jmicron_start_disk(struct g_raid_disk *disk) in g_raid_md_jmicron_start_disk() argument 431 sc = disk->d_softc; in g_raid_md_jmicron_start_disk() 435 pd = (struct g_raid_md_jmicron_perdisk *)disk->d_md_data; in g_raid_md_jmicron_start_disk() 438 /* Find disk position in metadata by its serial. */ in g_raid_md_jmicron_start_disk() [all …]
|
| H A D | md_nvidia.c | 367 struct g_raid_disk *disk; in g_raid_md_nvidia_get_disk() local 370 TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { in g_raid_md_nvidia_get_disk() 371 pd = (struct g_raid_md_nvidia_perdisk *)disk->d_md_data; in g_raid_md_nvidia_get_disk() 375 return (disk); in g_raid_md_nvidia_get_disk() 427 g_raid_md_nvidia_start_disk(struct g_raid_disk *disk) in g_raid_md_nvidia_start_disk() argument 438 sc = disk->d_softc; in g_raid_md_nvidia_start_disk() 442 pd = (struct g_raid_md_nvidia_perdisk *)disk->d_md_data; in g_raid_md_nvidia_start_disk() 445 /* Find disk position in metadata by its serial. */ in g_raid_md_nvidia_start_disk() 455 G_RAID_DEBUG1(1, sc, "Unknown, probably new or stale disk"); in g_raid_md_nvidia_start_disk() 460 * If we have already started - try to get use of the disk. in g_raid_md_nvidia_start_disk() [all …]
|
| H A D | md_intel.c | 41 #include <sys/disk.h> 188 struct intel_raid_disk disk[1]; /* total_disks entries. */ member 284 mvol = (struct intel_raid_vol *)&meta->disk[meta->total_disks]; in intel_get_volume() 336 intel_get_disk_sectors(struct intel_raid_disk *disk) in intel_get_disk_sectors() argument 338 off_t sectors = (off_t)disk->sectors_hi << 32; in intel_get_disk_sectors() 340 sectors += disk->sectors; in intel_get_disk_sectors() 345 intel_set_disk_sectors(struct intel_raid_disk *disk, off_t sectors) in intel_set_disk_sectors() argument 348 disk->sectors = sectors & 0xffffffff; in intel_set_disk_sectors() 349 disk->sectors_hi = sectors >> 32; in intel_set_disk_sectors() 483 printf("DISK# serial disk_sectors disk_sectors_hi disk_id flags owner\n"); in g_raid_md_intel_print() [all …]
|
| /freebsd-src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/vdev_zaps/ |
| H A D | vdev_zaps_004_pos.ksh | 23 # 1. Create a pool with one disk. Verify that it has a top and leaf ZAP. 24 # 2. Attach a disk. 26 # 4. Verify that the newly-attached disk has a leaf ZAP. 27 # 5. Detach the original disk. 36 DISK=${DISKS%% *} 37 log_must zpool create -f $TESTPOOL $DISK 44 orig_top=$(get_top_vd_zap $DISK $conf) 45 orig_leaf=$(get_leaf_vd_zap $DISK $conf) 46 assert_zap_common $TESTPOOL $DISK "top" $orig_top 49 # Attach a disk. [all …]
|
| /freebsd-src/share/doc/smm/01.setup/ |
| H A D | 2.t | 116 Transfer a bootable root filesystem from the tape to a disk 149 DISK's T{ 221 The \fIcontroller\fP field is the disk or tape's target number on the 227 and disks: for disks it is a disk partition (in the range 0-7), 229 Thus, partition 2 of a SCSI disk drive at target 3 on SCSI bus 1 239 Obtain a second disk and format it, if necessary. 242 tape onto the beginning of the disk. 244 Boot the UNIX system on the new disk. 246 (Optional) Build a root filesystem optimized for your disk. 251 .Sh 4 "Step 1: selecting and formatting a disk" [all …]
|
| /freebsd-src/lib/geom/union/ |
| H A D | gunion.8 | 67 utility is used to track changes to a read-only disk on a writable disk. 68 Logically, a writable disk is placed over a read-only disk. 69 Write requests are intercepted and stored on the writable disk. 71 on the top (writable disk) and if found are returned. 72 If they have not been written on the top disk, 73 then they are read from the lower disk. 77 utility can be especially useful if you have a large disk with a 81 to place another disk over the corrupted disk and then attempt 83 If the repair fails, you can revert all the changes in the upper disk 84 and be back to the unchanged state of the lower disk thus allowing you [all …]
|
| /freebsd-src/usr.sbin/bsdinstall/scripts/ |
| H A D | zfsboot | 250 msg_disk_info="Disk Info" 251 msg_disk_info_help="Get detailed information on disk device(s)" 253 msg_disk_singular="disk" 261 msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk" 266 msg_invalid_disk_argument="Invalid disk argument \`%s'" 275 msg_missing_disk_arguments="missing disk arguments" 278 msg_no_disks_present_to_configure="No disk(s) present to configure" 281 msg_null_disk_argument="NULL disk argument" 300 msg_raidz1_help="[3+ Disks] Withstand failure of 1 disk. Recommended for: 3, 5 or 9 disks" 308 msg_select_a_disk_device="Select a disk devic [all...] |
| /freebsd-src/share/doc/smm/02.config/ |
| H A D | 5.t | 54 disk Fujitsu mba0 hp0 55 disk Fujitsu mba0 hp1 57 disk Fujitsu mba1 hp2 58 disk Fujitsu mba1 hp3 103 to allow us to boot off any of the four disk drives. 116 disk hp0 at mba0 disk 0 117 disk hp1 at mba0 disk 1 119 disk hp2 at mba1 disk 2 120 disk hp3 at mba1 disk 3 135 our first disk controller were to break. We would like to recable the [all …]
|
| /freebsd-src/sys/geom/ |
| H A D | geom_disk.h | 50 #include <sys/disk.h> 52 #define G_DISK_CLASS_NAME "DISK" 54 struct disk; 56 typedef int disk_open_t(struct disk *); 57 typedef int disk_close_t(struct disk *); 60 typedef void disk_gone_t(struct disk *); 61 typedef int disk_ioctl_t(struct disk *, u_long cmd, void *data, 80 struct disk { struct 95 /* Disk methods */ 140 struct disk *disk_alloc(void); argument [all …]
|