Lines Matching refs:pers
435 if (!mddev->pers->make_request(mddev, bio)) { in md_handle_request()
451 if (mddev == NULL || mddev->pers == NULL) { in md_submit_bio()
493 mddev->pers->quiesce(mddev, 1); in mddev_suspend()
511 mddev->pers->quiesce(mddev, 0); in mddev_resume()
813 if (mddev->pers == NULL || in mddev_unlock()
814 mddev->pers->sync_request == NULL) { in mddev_unlock()
878 struct md_personality *pers; in find_pers() local
879 list_for_each_entry(pers, &pers_list, list) { in find_pers()
880 if (level != LEVEL_NONE && pers->level == level) in find_pers()
881 return pers; in find_pers()
882 if (strcmp(pers->name, clevel)==0) in find_pers()
883 return pers; in find_pers()
1168 mdname(mddev), mddev->pers->name); in md_check_no_bitmap()
1361 } else if (mddev->pers == NULL) { in super_90_validate()
1892 } else if (mddev->pers == NULL) { in super_1_validate()
2399 if (rdev_read_only(rdev) && mddev->pers) in bind_rdev_to_array()
2406 if (mddev->pers) { in bind_rdev_to_array()
2424 if (mddev->pers) in bind_rdev_to_array()
2863 if (!mddev->pers->hot_remove_disk || add_journal) { in add_bound_rdev()
2872 err = mddev->pers->hot_add_disk(mddev, rdev); in add_bound_rdev()
2981 if (cmd_match(buf, "faulty") && rdev->mddev->pers) { in state_store()
2988 if (rdev->mddev->pers) { in state_store()
3001 if (mddev->pers) { in state_store()
3050 if (rdev->mddev->pers == NULL) { in state_store()
3085 if (rdev->mddev->pers) in state_store()
3093 if (rdev->mddev->pers) in state_store()
3100 if (!rdev->mddev->pers) in state_store()
3181 if (rdev->mddev->pers && slot == -1) { in slot_store()
3192 if (rdev->mddev->pers->hot_remove_disk == NULL) in slot_store()
3200 } else if (rdev->mddev->pers) { in slot_store()
3212 if (rdev->mddev->pers->hot_add_disk == NULL) in slot_store()
3226 err = rdev->mddev->pers->hot_add_disk(rdev->mddev, rdev); in slot_store()
3264 if (rdev->mddev->pers && rdev->raid_disk >= 0) in offset_store()
3321 if (mddev->pers && mddev->persistent && in new_offset_store()
3384 if (my_mddev->pers && rdev->raid_disk >= 0) { in rdev_size_store()
3393 if (!my_mddev->pers->resize) in rdev_size_store()
3468 if (rdev->mddev->pers && in recovery_start_store()
3536 if (rdev->mddev->pers && test_bit(MD_HAS_PPL, &rdev->mddev->flags) && in ppl_sector_store()
3573 if (rdev->mddev->pers && test_bit(MD_HAS_PPL, &rdev->mddev->flags) && in ppl_size_store()
3898 p = mddev->pers; in level_show()
3917 struct md_personality *pers, *oldpers; in level_store() local
3929 if (mddev->pers == NULL) { in level_store()
3956 if (!mddev->pers->quiesce) { in level_store()
3958 mdname(mddev), mddev->pers->name); in level_store()
3973 pers = find_pers(level, clevel); in level_store()
3974 if (!pers || !try_module_get(pers->owner)) { in level_store()
3982 if (pers == mddev->pers) { in level_store()
3984 module_put(pers->owner); in level_store()
3988 if (!pers->takeover) { in level_store()
3989 module_put(pers->owner); in level_store()
4002 priv = pers->takeover(mddev); in level_store()
4010 module_put(pers->owner); in level_store()
4022 oldpers = mddev->pers; in level_store()
4024 mddev->pers = pers; in level_store()
4026 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); in level_store()
4052 pers->sync_request != NULL) { in level_store()
4062 pers->sync_request == NULL) { in level_store()
4094 if (pers->sync_request == NULL) { in level_store()
4102 pers->run(mddev); in level_store()
4142 if (mddev->pers) { in layout_store()
4143 if (mddev->pers->check_reshape == NULL) in layout_store()
4149 err = mddev->pers->check_reshape(mddev); in layout_store()
4191 if (mddev->pers) in raid_disks_store()
4251 if (mddev->pers) { in chunk_size_store()
4252 if (mddev->pers->check_reshape == NULL) in chunk_size_store()
4258 err = mddev->pers->check_reshape(mddev); in chunk_size_store()
4300 if (mddev->pers && !test_bit(MD_RECOVERY_FROZEN, &mddev->recovery)) in resync_start_store()
4305 if (mddev->pers) in resync_start_store()
4376 if (mddev->pers && !test_bit(MD_NOT_READY, &mddev->flags)) { in array_state_show()
4420 if (mddev->pers && (st == active || st == clean) && mddev->ro != 1) { in array_state_store()
4453 if (mddev->pers) in array_state_store()
4461 if (mddev->pers) in array_state_store()
4470 if (mddev->pers) { in array_state_store()
4485 if (mddev->pers) { in array_state_store()
4497 if (mddev->pers) { in array_state_store()
4694 if (mddev->pers) { in size_store()
4825 if (!mddev->pers || !mddev->pers->sync_request) in action_store()
4853 if (mddev->pers->start_reshape == NULL) in action_store()
4861 err = mddev->pers->start_reshape(mddev); in action_store()
5157 if (mddev->pers == NULL || in suspend_lo_store()
5158 mddev->pers->quiesce == NULL) in suspend_lo_store()
5194 if (mddev->pers == NULL) in suspend_hi_store()
5235 if (mddev->pers) in reshape_position_store()
5323 if (mddev->pers) in array_size_store()
5324 sectors = mddev->pers->size(mddev, 0, 0); in array_size_store()
5332 else if (mddev->pers && mddev->pers->size(mddev, 0, 0) < sectors) in array_size_store()
5340 if (mddev->pers) in array_size_store()
5363 } else if (mddev->pers) { in consistency_policy_show()
5364 if (mddev->pers->sync_request) in consistency_policy_show()
5380 if (mddev->pers) { in consistency_policy_store()
5381 if (mddev->pers->change_consistency_policy) in consistency_policy_store()
5382 err = mddev->pers->change_consistency_policy(mddev, buf); in consistency_policy_store()
5428 if (mddev->pers == NULL || (mddev->pers->level != 1)) in serialize_policy_show()
5454 if (mddev->pers == NULL || (mddev->pers->level != 1)) { in serialize_policy_store()
5795 struct md_personality *pers; in md_run() local
5801 if (mddev->pers) in md_run()
5887 pers = find_pers(mddev->level, mddev->clevel); in md_run()
5888 if (!pers || !try_module_get(pers->owner)) { in md_run()
5900 if (mddev->level != pers->level) { in md_run()
5901 mddev->level = pers->level; in md_run()
5902 mddev->new_level = pers->level; in md_run()
5904 strlcpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); in md_run()
5907 pers->start_reshape == NULL) { in md_run()
5909 module_put(pers->owner); in md_run()
5914 if (pers->sync_request) { in md_run()
5948 err = pers->run(mddev); in md_run()
5951 else if (pers->size(mddev, 0, 0) < mddev->array_sectors) { in md_run()
5957 (unsigned long long)pers->size(mddev, 0, 0) / 2); in md_run()
5960 if (err == 0 && pers->sync_request && in md_run()
6013 if (pers->sync_request) { in md_run()
6034 mddev->pers = pers; in md_run()
6056 pers->free(mddev, mddev->private); in md_run()
6058 module_put(pers->owner); in md_run()
6110 if (mddev->pers->start) { in md_start()
6113 ret = mddev->pers->start(mddev); in md_start()
6131 if (!mddev->pers) in restart_array()
6224 if (mddev->pers && mddev->pers->quiesce) { in __md_stop_writes()
6225 mddev->pers->quiesce(mddev, 1); in __md_stop_writes()
6226 mddev->pers->quiesce(mddev, 0); in __md_stop_writes()
6254 if (mddev->pers && mddev->pers->quiesce && !mddev->suspended) { in mddev_detach()
6255 mddev->pers->quiesce(mddev, 1); in mddev_detach()
6256 mddev->pers->quiesce(mddev, 0); in mddev_detach()
6265 struct md_personality *pers = mddev->pers; in __md_stop() local
6272 mddev->pers = NULL; in __md_stop()
6275 pers->free(mddev, mddev->private); in __md_stop()
6277 if (pers->sync_request && mddev->to_remove == NULL) in __md_stop()
6279 module_put(pers->owner); in __md_stop()
6324 if ((mddev->pers && atomic_read(&mddev->openers) > !!bdev) || in md_set_readonly()
6336 if (mddev->pers) { in md_set_readonly()
6385 if ((mddev->pers && atomic_read(&mddev->openers) > !!bdev) || in do_md_stop()
6398 if (mddev->pers) { in do_md_stop()
6755 if (mddev->pers) { in md_add_new_disk()
6757 if (!mddev->pers->hot_add_disk) { in md_add_new_disk()
6917 if (!mddev->pers) in hot_remove_disk()
6960 if (!mddev->pers) in hot_add_disk()
6968 if (!mddev->pers->hot_add_disk) { in hot_add_disk()
7030 if (mddev->pers) { in set_bitmap_file()
7031 if (!mddev->pers->quiesce || !mddev->thread) in set_bitmap_file()
7075 if (mddev->pers) { in set_bitmap_file()
7215 if (mddev->pers->resize == NULL) in update_size()
7240 rv = mddev->pers->resize(mddev, num_sectors); in update_size()
7257 if (mddev->pers->check_reshape == NULL) in update_raid_disks()
7285 rv = mddev->pers->check_reshape(mddev); in update_raid_disks()
7342 if (mddev->pers->check_reshape == NULL) in update_array_info()
7346 rv = mddev->pers->check_reshape(mddev); in update_array_info()
7359 if (mddev->pers->quiesce == NULL || mddev->thread == NULL) { in update_array_info()
7433 if (mddev->pers == NULL) in set_disk_faulty()
7572 if (mddev->pers && atomic_read(&mddev->openers) > 1) { in md_ioctl()
7601 if (mddev->pers) { in md_ioctl()
7665 if (mddev->pers) { in md_ioctl()
7683 if (mddev->ro && mddev->pers) { in md_ioctl()
7788 if (!ro && mddev->ro == 1 && mddev->pers) { in md_set_read_only()
7981 if (!mddev->pers || !mddev->pers->error_handler) in md_error()
7983 mddev->pers->error_handler(mddev,rdev); in md_error()
8218 struct md_personality *pers; in md_seq_show() local
8221 list_for_each_entry(pers, &pers_list, list) in md_seq_show()
8222 seq_printf(seq, "[%s] ", pers->name); in md_seq_show()
8235 if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) { in md_seq_show()
8237 mddev->pers ? "" : "in"); in md_seq_show()
8238 if (mddev->pers) { in md_seq_show()
8243 seq_printf(seq, " %s", mddev->pers->name); in md_seq_show()
8269 if (mddev->pers) in md_seq_show()
8290 if (mddev->pers) { in md_seq_show()
8291 mddev->pers->status(seq, mddev); in md_seq_show()
8293 if (mddev->pers->sync_request) { in md_seq_show()
8640 if (!mddev->pers) in md_allow_write()
8644 if (!mddev->pers->sync_request) in md_allow_write()
8837 mddev->pers->quiesce(mddev, 1); in md_do_sync()
8838 mddev->pers->quiesce(mddev, 0); in md_do_sync()
8922 sectors = mddev->pers->sync_request(mddev, j, &skipped); in md_do_sync()
9012 mddev->pers->sync_request(mddev, max_sectors, &skipped); in md_do_sync()
9059 mddev->pers->finish_reshape && in md_do_sync()
9060 mddev->pers->size && in md_do_sync()
9063 md_set_array_sectors(mddev, mddev->pers->size(mddev, 0, 0)); in md_do_sync()
9126 if (mddev->pers->hot_remove_disk( in remove_and_add_spares()
9166 if (mddev->pers->hot_add_disk(mddev, rdev) == 0) { in remove_and_add_spares()
9251 if (mddev->pers->sync_request && !mddev->external) { in md_check_recovery()
9362 if (mddev->pers->check_reshape == NULL || in md_check_recovery()
9363 mddev->pers->check_reshape(mddev) != 0) in md_check_recovery()
9380 if (mddev->pers->sync_request) { in md_check_recovery()
9421 if (mddev->pers->spare_active(mddev)) { in md_reap_sync_thread()
9427 mddev->pers->finish_reshape) { in md_reap_sync_thread()
9428 mddev->pers->finish_reshape(mddev); in md_reap_sync_thread()
9547 if (mddev->pers) in md_notify_reboot()
9635 ret = mddev->pers->resize(mddev, le64_to_cpu(sb->size)); in check_sb_changes()
9705 if (mddev->pers->update_reshape_pos) in check_sb_changes()
9706 mddev->pers->update_reshape_pos(mddev); in check_sb_changes()
9707 if (mddev->pers->start_reshape) in check_sb_changes()
9708 mddev->pers->start_reshape(mddev); in check_sb_changes()
9714 if (mddev->pers->update_reshape_pos) in check_sb_changes()
9715 mddev->pers->update_reshape_pos(mddev); in check_sb_changes()
9762 mddev->pers->spare_active(mddev)) in read_rdev()