Lines Matching defs:disk

55     "Amount of the disk to rebuild each read/write cycle of the rebuild.");
63 "Fraction of the I/O bandwidth to use when disk busy for rebuild.");
149 int *disk, off_t *offset, off_t *start)
160 *disk = (nstrip * N) % vol->v_disks_count;
161 /* Strip start position in disk. */
166 P2V(struct g_raid_volume *vol, int disk, off_t offset,
176 nstrip = (offset / strip_size) * vol->v_disks_count + disk;
339 struct g_raid_disk *disk)
345 * We don't fail the last disk in the pack, since it still has decent
346 * data on it and that's better than failing the disk if it is the root
360 g_raid_fail_disk(sc, sd, disk);
438 int disk, copy, best;
455 V2P(vol, virtual, &disk, &offset, &start);
461 /* Find disk with most accurate data. */
462 best = g_raid_tr_raid1e_select_read_disk(vol, disk,
465 /* There is no any valid disk. */
469 /* Some other disk has better data. */
481 ((disk + best >= vol->v_disks_count) ? vol->v_strip_size : 0);
486 bp->bio_caller1 = &vol->v_subdisks[(disk + best) % vol->v_disks_count];
546 "No failed disk to rebuild. night night.");
635 * Select the disk to read from. Take into account: subdisk state, running
636 * error recovery, average disk load, head position and possible cache hits.
676 /* If disk head is precisely in position - highly prefer it. */
680 /* If disk head is close to position - prefer it. */
717 KASSERT(best >= 0, ("No readable disk in volume %s!",
856 * even when the disk is busy. Be sure to only count real I/O
857 * to the disk. All 'SPECIAL' I/O is traffic generated to the disk
898 int error, do_write, copy, disk, best;
1008 * another disk drive, if available, before erroring out the
1030 V2P(vol, virtual, &disk, &offset, &start);
1032 /* Find the other disk, and try to do the I/O to it. */
1035 disk, offset, start, mask);
1037 disk += best;
1038 if (disk >= vol->v_disks_count) {
1039 disk -= vol->v_disks_count;
1049 nsd = &vol->v_subdisks[disk];
1069 * through. This will happen when there's only one good disk.
1082 V2P(vol, virtual, &disk, &offset, &start);
1084 /* Find best disk to write. */
1086 disk, offset, start, ~mask);
1088 disk += best;
1089 if (disk >= vol->v_disks_count) {
1090 disk -= vol->v_disks_count;
1100 g_raid_subdisk_iostart(&vol->v_subdisks[disk], cbp);
1107 * For any write errors, we agressively fail the disk since
1117 V2P(vol, virtual, &disk, &offset, &start);
1121 vol->v_subdisks[(disk + copy) %