Lines Matching refs:mddev

189 	raid1_conf_t *conf = mddev_to_conf(r1_bh->mddev);  in raid1_free_r1bh()
220 r1_bh->mddev = conf->mddev; in raid1_grow_r1bh()
246 raid1_conf_t *conf = mddev_to_conf(r1_bh->mddev); in raid1_free_buf()
324 static int raid1_map (mddev_t *mddev, kdev_t *rdev) in raid1_map() argument
326 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_map()
352 mddev_t *mddev = r1_bh->mddev; in raid1_reschedule_retry() local
353 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_reschedule_retry()
404 io_request_done(bh->b_rsector, mddev_to_conf(r1_bh->mddev), in raid1_end_bh_io()
418 md_error (r1_bh->mddev, bh->b_dev); in raid1_end_request()
590 static int raid1_make_request (mddev_t *mddev, int rw, in raid1_make_request() argument
593 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_make_request()
636 r1_bh->mddev = mddev; in raid1_make_request()
743 static void raid1_status(struct seq_file *seq, mddev_t *mddev) in raid1_status() argument
745 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_status()
772 static void mark_disk_bad (mddev_t *mddev, int failed) in mark_disk_bad() argument
774 raid1_conf_t *conf = mddev_to_conf(mddev); in mark_disk_bad()
776 mdp_super_t *sb = mddev->sb; in mark_disk_bad()
788 mddev->sb_dirty = 1; in mark_disk_bad()
796 static int raid1_error (mddev_t *mddev, kdev_t dev) in raid1_error() argument
798 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_error()
825 mark_disk_bad(mddev, i); in raid1_error()
860 mddev_t *mddev = conf->mddev; in close_sync() local
871 conf->start_future = (mddev->sb->size<<1)+1; in close_sync()
884 static int raid1_diskop(mddev_t *mddev, mdp_disk_t **d, int state) in raid1_diskop() argument
888 raid1_conf_t *conf = mddev->private; in raid1_diskop()
890 mdp_super_t *sb = mddev->sb; in raid1_diskop()
1071 spare_rdev = find_rdev_nr(mddev, spare_desc->number); in raid1_diskop()
1072 failed_rdev = find_rdev_nr(mddev, failed_desc->number); in raid1_diskop()
1191 mddev_t *mddev = conf->mddev; in raid1d() local
1194 if (mddev->sb_dirty) in raid1d()
1195 md_update_sb(mddev); in raid1d()
1205 mddev = r1_bh->mddev; in raid1d()
1217 conf = mddev_to_conf(mddev); in raid1d()
1272 md_done_sync(mddev, bh->b_size>>9, 0); in raid1d()
1287 md_done_sync(mddev, bh->b_size>>9, 0); in raid1d()
1294 raid1_map (mddev, &bh->b_dev); in raid1d()
1320 mddev_t *mddev = conf->mddev; in raid1syncd() local
1326 down(&mddev->recovery_sem); in raid1syncd()
1327 if (!md_do_sync(mddev, NULL)) { in raid1syncd()
1336 up(&mddev->recovery_sem); in raid1syncd()
1390 static int raid1_sync_request (mddev_t *mddev, unsigned long sector_nr) in raid1_sync_request() argument
1392 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_sync_request()
1471 r1_bh->mddev = mddev; in raid1_sync_request()
1478 && (block_nr+2)*(bsize>>9) <= (mddev->sb->size *2)) { in raid1_sync_request()
1518 md_error (r1_bh->mddev, bh->b_dev); in end_sync_read()
1529 md_error (r1_bh->mddev, bh->b_dev); in end_sync_write()
1531 mddev_t *mddev = r1_bh->mddev; in end_sync_write() local
1535 sync_request_done(sect, mddev_to_conf(mddev)); in end_sync_write()
1536 md_done_sync(mddev,size>>9, uptodate); in end_sync_write()
1579 static int raid1_run (mddev_t *mddev) in raid1_run() argument
1584 mdp_super_t *sb = mddev->sb; in raid1_run()
1593 printk(INVALID_LEVEL, mdidx(mddev), sb->level); in raid1_run()
1603 mddev->private = conf; in raid1_run()
1605 printk(MEM_ERROR, mdidx(mddev)); in raid1_run()
1610 ITERATE_RDEV(mddev,rdev,tmp) { in raid1_run()
1688 conf->mddev = mddev; in raid1_run()
1697 printk(NONE_OPERATIONAL, mdidx(mddev)); in raid1_run()
1714 printk(MEM_ERROR, mdidx(mddev)); in raid1_run()
1754 printk(THREAD_ERROR, mdidx(mddev)); in raid1_run()
1765 printk(THREAD_ERROR, mdidx(mddev)); in raid1_run()
1769 printk(START_RESYNC, mdidx(mddev)); in raid1_run()
1773 …ERN_ALERT "raid1: md%d, not all disks are operational -- trying to recover array\n", mdidx(mddev)); in raid1_run()
1796 printk(ARRAY_IS_ACTIVE, mdidx(mddev), sb->active_disks, sb->raid_disks); in raid1_run()
1807 mddev->private = NULL; in raid1_run()
1824 static int raid1_stop_resync (mddev_t *mddev) in raid1_stop_resync() argument
1826 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_stop_resync()
1841 static int raid1_restart_resync (mddev_t *mddev) in raid1_restart_resync() argument
1843 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_restart_resync()
1857 static int raid1_stop (mddev_t *mddev) in raid1_stop() argument
1859 raid1_conf_t *conf = mddev_to_conf(mddev); in raid1_stop()
1868 mddev->private = NULL; in raid1_stop()