• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/md/

Lines Matching refs:disk

253  * Update disk head position estimator based on IRQ completion info.
255 static inline void update_head_pos(int disk, r1bio_t *r1_bio)
259 conf->mirrors[disk].head_position =
407 * This routine returns the disk from which the requested read should
409 * number - if this matches on the next IO then we use the last disk.
410 * There is also a per-disk 'last know head position' sector that is
413 * perfect sequential match then we pick the disk whose head is closest.
423 int new_disk = conf->last_used, disk = new_disk;
433 * We take the first readable disk when above the resync window.
460 /* make sure the disk is operational */
474 if (new_disk == disk) {
483 disk = new_disk;
484 /* now disk == new_disk == starting point for search */
487 * Don't change to another disk for sequential reads:
494 current_distance = abs(this_sector - conf->mirrors[disk].head_position);
496 /* Find the disk whose head is closest */
499 if (disk <= 0)
500 disk = conf->raid_disks;
501 disk--;
503 rdev = rcu_dereference(conf->mirrors[disk].rdev);
505 if (!rdev || r1_bio->bios[disk] == IO_BLOCKED ||
511 new_disk = disk;
514 new_distance = abs(this_sector - conf->mirrors[disk].head_position);
517 new_disk = disk;
519 } while (disk != conf->last_used);
620 * disk before proceeding w/ I/O */
1091 printk(KERN_DEBUG " disk %d, wo:%d, o:%d, dev:%s\n",
1663 int disk;
1684 if ((disk=read_balance(conf, r1_bio)) == -1) {
1695 r1_bio->read_disk = disk;
1699 rdev = conf->mirrors[disk].rdev;
1752 int disk = -1;
1860 if (disk < 0)
1861 disk = i;
1871 if (disk < 0)
1872 disk = wonly;
1873 r1_bio->read_disk = disk;
1935 } while (r1_bio->bios[disk]->bi_vcnt < RESYNC_PAGES);
1973 mirror_info_t *disk;
2008 disk = conf->mirrors + disk_idx;
2010 disk->rdev = rdev;
2012 disk->head_position = 0;
2027 disk = conf->mirrors + i;
2029 if (!disk->rdev ||
2030 !test_bit(In_sync, &disk->rdev->flags)) {
2031 disk->head_position = 0;
2032 if (disk->rdev)