Lines Matching refs:disk
48 * apart on disk, there are adjacent stripes.
339 * Update disk head position estimator based on IRQ completion info.
350 * Find the disk number which triggered given bio
711 * This routine returns the disk from which the requested read should
713 * number - if this matches on the next IO then we use the last disk.
714 * There is also a per-disk 'last know head position' sector that is
717 * perfect sequential match then we pick the disk whose head is closest.
734 int disk, slot;
758 * the resync window. We take the first readable disk when
777 disk = r10_bio->devs[slot].devnum;
778 rdev = rcu_dereference(conf->mirrors[disk].replacement);
788 rdev = rcu_dereference(conf->mirrors[disk].rdev);
856 conf->mirrors[disk].head_position);
1194 int disk;
1202 disk = r10_bio->devs[slot].devnum;
1203 err_rdev = rcu_dereference(conf->mirrors[disk].rdev);
1375 * so it doesn't need to wait blocked disk here.
1514 * only applies if the disk is missing,
1658 int disk;
1702 * size, there is hole when we submit discard bio to member disk.
1739 * One stripe contains the chunks from all member disk (one chunk from
1740 * one disk at the same HBA address). For layout detail, see 'man md 4'
1789 for (disk = 0; disk < geo->raid_disks; disk++) {
1792 rdev = dereference_rdev_and_rrdev(&conf->mirrors[disk], &rrdev);
1793 r10_bio->devs[disk].bio = NULL;
1794 r10_bio->devs[disk].repl_bio = NULL;
1804 r10_bio->devs[disk].bio = bio;
1808 r10_bio->devs[disk].repl_bio = bio;
1815 for (disk = 0; disk < geo->raid_disks; disk++) {
1820 * Now start to calculate the start and end address for each disk.
1824 * 1st, the disk is before start_disk, you can imagine the disk in
1827 * 2st, the disk is after start_disk, it means the disk is at the
1828 * same stripe of first disk
1829 * 3st, the first disk itself, we can use start_disk_offset directly
1831 if (disk < start_disk_index)
1833 else if (disk > start_disk_index)
1838 if (disk < end_disk_index)
1840 else if (disk > end_disk_index)
1851 if (r10_bio->devs[disk].bio) {
1852 struct md_rdev *rdev = conf->mirrors[disk].rdev;
1857 r10_bio->devs[disk].bio = mbio;
1858 r10_bio->devs[disk].devnum = disk;
1865 if (r10_bio->devs[disk].repl_bio) {
1866 struct md_rdev *rrdev = conf->mirrors[disk].replacement;
1871 r10_bio->devs[disk].repl_bio = rbio;
1872 r10_bio->devs[disk].devnum = disk;
2080 pr_debug(" disk %d, wo:%d, o:%d, dev:%pg\n",
4151 struct raid10_info *disk;
4200 disk = conf->mirrors + disk_idx;
4203 if (disk->replacement)
4205 disk->replacement = rdev;
4207 if (disk->rdev)
4209 disk->rdev = rdev;
4223 disk->head_position = 0;
4250 disk = conf->mirrors + i;
4252 if (!disk->rdev && disk->replacement) {
4254 disk->rdev = disk->replacement;
4255 disk->replacement = NULL;
4256 clear_bit(Replacement, &disk->rdev->flags);
4259 if (!disk->rdev ||
4260 !test_bit(In_sync, &disk->rdev->flags)) {
4261 disk->head_position = 0;
4263 if (disk->rdev &&
4264 disk->rdev->saved_raid_disk < 0)
4268 if (disk->replacement &&
4269 !test_bit(In_sync, &disk->replacement->flags) &&
4270 disk->replacement->saved_raid_disk < 0) {
4274 disk->recovery_disabled = mddev->recovery_disabled - 1;
4783 * yet recorded as 'safe' (i.e. in metadata on disk) then