Home
last modified time | relevance | path

Searched refs:disk (Results 1 – 25 of 540) sorted by relevance

12345678910>>...22

/freebsd/lib/libufs/
H A Dtype.c58 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 Dinode.c51 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 Dblock.c52 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()
98 rv = ufs_disk_write(disk); in bwrite()
[all …]
H A Dsblock.c64 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()
108 ERROR(disk, "no usable known superblock found"); in handle_disk_read()
[all …]
H A Dcgroup.c51 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 …]
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zpool_create/
H A Dzpool_create_007_neg.ksh55 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 \
73 log ${disk}p3" \
[all …]
H A Dzpool_create_011_neg.ksh74 disk=$DISK
76 disk=$DISK0
78 pooldev1=${disk}p1
79 pooldev2=${disk}p2
80 mirror1="${disk}p2 ${disk}p3"
81 mirror2="${disk}p4 ${disk}p5"
84 diff_size_dev="${disk}p6 ${disk}p7"
86 specified_dump_dev=${disk}
88 lba=$(get_partition_end $disk 6)
89 $GPART delete -i 7 $disk
[all …]
/freebsd/contrib/netbsd-tests/sbin/gpt/
H A Dt_gpt.sh35 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/sys/geom/mirror/
H A Dg_mirror.c113 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 = arg; in g_mirror_event_dispatch()
200 sc = disk->d_softc; in g_mirror_event_dispatch()
[all …]
/freebsd/tools/tools/bootparttest/
H A Dbootparttest.c59 struct disk { struct
65 } disk; variable
80 ret = pread(disk.fd, buf, size, in disk_strategy()
81 (blk + dev->d_offset) * disk.sectorsize); in disk_strategy()
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()
106 disk.mediasize = sb.st_size; in main()
107 disk.sectorsize = 512; in main()
108 disk.file = 1; in main()
[all …]
/freebsd/contrib/bmake/unit-tests/
H A Dhanoi-include.exp1 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/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_offline/
H A Dzpool_offline_003_pos.ksh55 for disk in $DISKLIST; do
56 log_must zpool online $TESTPOOL $disk
57 log_must check_state $TESTPOOL $disk "online"
73 disk=${DISKLIST%% *}
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"
84 log_must zpool offline $TESTPOOL $disk
85 check_state $TESTPOOL $disk "offline"
[all …]
/freebsd/sys/geom/raid3/
H A Dg_raid3.c123 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) g_raid3_event_cancel() argument
397 struct g_raid3_disk *disk; g_raid3_ndisks() local
500 g_raid3_connect_disk(struct g_raid3_disk * disk,struct g_provider * pp) g_raid3_connect_disk() argument
555 struct g_raid3_disk *disk; g_raid3_init_disk() local
580 g_raid3_destroy_disk(struct g_raid3_disk * disk) g_raid3_destroy_disk() argument
644 struct g_raid3_disk *disk; g_raid3_destroy_device() local
692 struct g_raid3_disk *disk; g_raid3_orphan() local
705 g_raid3_write_metadata(struct g_raid3_disk * disk,struct g_raid3_metadata * md) g_raid3_write_metadata() argument
753 g_raid3_clear_metadata(struct g_raid3_disk * disk) g_raid3_clear_metadata() argument
773 g_raid3_fill_metadata(struct g_raid3_disk * disk,struct g_raid3_metadata * md) g_raid3_fill_metadata() argument
807 g_raid3_update_metadata(struct g_raid3_disk * disk) g_raid3_update_metadata() argument
832 struct g_raid3_disk *disk; g_raid3_bump_syncid() local
857 struct g_raid3_disk *disk; g_raid3_bump_genid() local
882 struct g_raid3_disk *disk; g_raid3_idle() local
918 struct g_raid3_disk *disk; g_raid3_unidle() local
1072 struct g_raid3_disk *disk; g_raid3_scatter() local
1142 struct g_raid3_disk *disk; g_raid3_gather() local
1306 struct g_raid3_disk *disk; g_raid3_regular_request() local
1414 struct g_raid3_disk *disk; g_raid3_flush() local
1498 struct g_raid3_disk *disk; g_raid3_sync_collision() local
1627 struct g_raid3_disk *disk; g_raid3_sync_request() local
1800 struct g_raid3_disk *disk; g_raid3_register_request() local
2190 g_raid3_update_idle(struct g_raid3_softc * sc,struct g_raid3_disk * disk) g_raid3_update_idle() argument
2211 struct g_raid3_disk *disk; g_raid3_sync_start() local
2308 struct g_raid3_disk *disk; g_raid3_sync_stop() local
2349 struct g_raid3_disk *disk; g_raid3_launch_provider() local
2433 g_raid3_determine_state(struct g_raid3_disk * disk) g_raid3_determine_state() argument
2503 struct g_raid3_disk *disk; g_raid3_update_device() local
2730 g_raid3_update_disk(struct g_raid3_disk * disk,u_int state) g_raid3_update_disk() argument
3051 struct g_raid3_disk *disk; g_raid3_add_disk() local
3449 struct g_raid3_disk *disk; g_raid3_dumpconf() local
[all...]
/freebsd/sys/geom/concat/
H A Dg_concat.c104 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()
131 disk->d_removed = 1; in g_concat_remove_disk()
143 disk->d_consumer = NULL; in g_concat_remove_disk()
[all …]
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/
H A Dzpool_offline_001_pos.ksh65 for disk in $DISKLIST; do
66 log_must $ZPOOL online $TESTPOOL $disk
67 check_state $TESTPOOL $disk "online"
69 log_fail "Unable to online $disk"
86 for disk in $DISKLIST; do
90 log_must $ZPOOL offline ${args[$i]} $TESTPOOL $disk
91 check_state $TESTPOOL $disk "offline"
93 log_fail "$disk of $TESTPOOL did not match offline state"
96 log_mustnot $ZPOOL offline ${args[$i]} $TESTPOOL $disk
97 check_state $TESTPOOL $disk "online"
[all …]
/freebsd/sys/dev/altera/sdcard/
H A Daltera_sdcard_disk.c63 altera_sdcard_disk_ioctl(struct disk *disk, u_long cmd, void *data, int fflag, in altera_sdcard_disk_ioctl() argument
118 struct disk *disk; in altera_sdcard_disk_insert() local
132 disk = disk_alloc(); in altera_sdcard_disk_insert()
133 disk->d_drv1 = sc; in altera_sdcard_disk_insert()
134 disk->d_name = "altera_sdcard"; in altera_sdcard_disk_insert()
135 disk->d_unit = sc->as_unit; in altera_sdcard_disk_insert()
136 disk->d_strategy = altera_sdcard_disk_strategy; in altera_sdcard_disk_insert()
137 disk->d_dump = altera_sdcard_disk_dump; in altera_sdcard_disk_insert()
138 disk->d_ioctl = altera_sdcard_disk_ioctl; in altera_sdcard_disk_insert()
139 disk->d_sectorsize = ALTERA_SDCARD_SECTORSIZE; in altera_sdcard_disk_insert()
[all …]
/freebsd/sys/geom/
H A Dgeom_disk.h54 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
140 struct disk *disk_alloc(void); argument
141 void disk_create(struct disk *disk, int version);
142 void disk_destroy(struct disk *disk);
143 void disk_gone(struct disk *disk);
[all …]
/freebsd/sys/dev/nvd/
H A Dnvd.c82 struct disk *disk; member
253 disk_gone(ndisk->disk); in nvd_gone()
266 nvd_gonecb(struct disk *dp) in nvd_gonecb()
270 disk_destroy(ndisk->disk); in nvd_gonecb()
283 nvd_ioctl(struct disk *dp, u_long cmd, void *data, int fflag, in nvd_ioctl()
294 struct disk *dp = arg; in nvd_dump()
419 struct disk *disk; in nvd_new_disk() local
452 disk = ndisk->disk = disk_alloc(); in nvd_new_disk()
453 disk->d_strategy = nvd_strategy; in nvd_new_disk()
454 disk->d_ioctl = nvd_ioctl; in nvd_new_disk()
[all …]
/freebsd/usr.sbin/bsdinstall/scripts/
H A Dzfsboot455 line="$line $disk"
527 debug= $disk get name name
531 new_list="$new_list $disk"
537 for disk in $disks; do
538 debug= $disk get name name
539 geom disk list $name | awk '$1 == "Mode:" && $2 != "r0w0e0" { exit 1 }'
540 [ $? -eq 0 ] && avail_disks="$avail_disks $disk"
547 for disk in $disks; do
548 debug= $disk get name name
613 $disk $DEVICE_TYPE_DISK device
[all …]
/freebsd/tests/sys/cddl/zfs/tests/cli_root/zpool_online/
H A Dzpool_online_001_pos.ksh63 for disk in $DISKLIST; do
64 log_must $ZPOOL online $TESTPOOL $disk
65 check_state $TESTPOOL $disk "online"
67 log_fail "Unable to online $disk"
83 for disk in $DISKLIST; do
86 log_must $ZPOOL offline $TESTPOOL $disk
87 check_state $TESTPOOL $disk "offline"
89 log_fail "$disk of $TESTPOOL did not match offline state"
92 log_must $ZPOOL online ${args[$i]} $TESTPOOL $disk
93 check_state $TESTPOOL $disk "online"
[all …]
/freebsd/sys/geom/raid/
H A Dmd_jmicron.c357 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()
478 g_raid_change_disk_state(disk, in g_raid_md_jmicron_start_disk()
482 g_raid_change_disk_state(disk, in g_raid_md_jmicron_start_disk()
500 g_raid_change_disk_state(disk, G_RAID_DISK_S_STALE); in g_raid_md_jmicron_start_disk()
[all …]
H A Dmd_sii.c414 struct g_raid_disk *disk; in g_raid_md_sii_get_disk() local
417 TAILQ_FOREACH(disk, &sc->sc_disks, d_next) { in g_raid_md_sii_get_disk()
418 pd = (struct g_raid_md_sii_perdisk *)disk->d_md_data; in g_raid_md_sii_get_disk()
422 return (disk); in g_raid_md_sii_get_disk()
475 g_raid_md_sii_start_disk(struct g_raid_disk *disk) in g_raid_md_sii_start_disk() argument
486 sc = disk->d_softc; in g_raid_md_sii_start_disk()
490 pd = (struct g_raid_md_sii_perdisk *)disk->d_md_data; in g_raid_md_sii_start_disk()
533 g_raid_change_disk_state(disk, in g_raid_md_sii_start_disk()
537 g_raid_change_disk_state(disk, in g_raid_md_sii_start_disk()
555 g_raid_change_disk_state(disk, G_RAID_DISK_S_STALE); in g_raid_md_sii_start_disk()
[all …]
/freebsd/usr.sbin/bsdinstall/partedit/
H A Dscripted.c65 part_config(char *disk, const char *scheme, char *config) in part_config() argument
79 if (provider_for_name(&mesh, disk) == NULL) { in part_config()
80 fprintf(stderr, "GEOM provider %s not found\n", disk); in part_config()
91 if (strcmp(gpart->lg_name, disk) == 0) in part_config()
96 gpart_partition(disk, scheme); in part_config()
102 gpart_create(provider_for_name(&submesh, disk), in part_config()
103 "freebsd", NULL, NULL, &disk, 0); in part_config()
107 disk = strdup(disk); in part_config()
113 free(disk); in part_config()
119 wizard_makeparts(&mesh, disk, "ufs", 0); in part_config()
[all …]
/freebsd/tests/sys/cddl/zfs/include/
H A Dlibgnop.kshlib43 typeset disk=$1
56 disk_size=`diskinfo $disk | cut -f 3`
66 gnop create ${args} ${disk}
72 typeset disk
73 for disk in $@; do
74 create_gnop "$disk" || return 1
83 typeset disk=$1
86 gnop destroy -f ${disk}.nop
90 gnop status ${disk}.nop >/dev/null 2>/dev/null || break
98 typeset disk
[all …]
/freebsd/sbin/ffsinfo/
H A Dffsinfo.c75 static struct uufsd disk; variable
77 #define sblock disk.d_fs
78 #define acg disk.d_cg
99 ( disk.d_ufs == 1 \
214 if (ufs_disk_fillout_blank(&disk, device) == -1 || in main()
215 sbfind(&disk, 0) == -1) in main()
216 err(1, "superblock fetch(%s) failed: %s", device, disk.d_error); in main()
246 if (bread(&disk, fsbtodb(&sblock, in main()
251 err(1, "bread: %s", disk.d_error); in main()
271 if (bread(&disk, fsbtodb(&sblock, in main()
[all …]

12345678910>>...22