Lines Matching refs:pers

393 	if (!mddev->pers->make_request(mddev, bio)) {  in md_handle_request()
407 if (mddev == NULL || mddev->pers == NULL) { in md_submit_bio()
452 if (mddev->pers && mddev->pers->prepare_suspend) in mddev_suspend()
453 mddev->pers->prepare_suspend(mddev); in mddev_suspend()
562 if (WARN_ON_ONCE(!mddev->pers->make_request(mddev, bio))) in md_submit_flush_data()
800 if (mddev->pers == NULL || in mddev_unlock()
801 mddev->pers->sync_request == NULL) { in mddev_unlock()
866 struct md_personality *pers; in find_pers() local
867 list_for_each_entry(pers, &pers_list, list) { in find_pers()
868 if (level != LEVEL_NONE && pers->level == level) in find_pers()
869 return pers; in find_pers()
870 if (strcmp(pers->name, clevel)==0) in find_pers()
871 return pers; in find_pers()
1156 mdname(mddev), mddev->pers->name); in md_check_no_bitmap()
1349 } else if (mddev->pers == NULL) { in super_90_validate()
1879 } else if (mddev->pers == NULL) { in super_1_validate()
1910 } else if (mddev->pers == NULL && freshest && ev1 < mddev->events) { in super_1_validate()
2417 if (rdev_read_only(rdev) && mddev->pers) in bind_rdev_to_array()
2424 if (mddev->pers) { in bind_rdev_to_array()
2442 if (mddev->pers) in bind_rdev_to_array()
2844 if (!mddev->pers->hot_remove_disk || add_journal) { in add_bound_rdev()
2853 err = mddev->pers->hot_add_disk(mddev, rdev); in add_bound_rdev()
2962 if (cmd_match(buf, "faulty") && rdev->mddev->pers) { in state_store()
2970 if (rdev->mddev->pers) { in state_store()
2983 if (mddev->pers) { in state_store()
3032 if (rdev->mddev->pers == NULL) { in state_store()
3067 if (rdev->mddev->pers) in state_store()
3075 if (rdev->mddev->pers) in state_store()
3082 if (!rdev->mddev->pers) in state_store()
3166 if (rdev->mddev->pers && slot == -1) { in slot_store()
3177 if (rdev->mddev->pers->hot_remove_disk == NULL) in slot_store()
3185 } else if (rdev->mddev->pers) { in slot_store()
3197 if (rdev->mddev->pers->hot_add_disk == NULL) in slot_store()
3211 err = rdev->mddev->pers->hot_add_disk(rdev->mddev, rdev); in slot_store()
3249 if (rdev->mddev->pers && rdev->raid_disk >= 0) in offset_store()
3306 if (mddev->pers && mddev->persistent && in new_offset_store()
3390 if (my_mddev->pers && rdev->raid_disk >= 0) { in rdev_size_store()
3399 if (!my_mddev->pers->resize) in rdev_size_store()
3449 if (rdev->mddev->pers && in recovery_start_store()
3517 if (rdev->mddev->pers && test_bit(MD_HAS_PPL, &rdev->mddev->flags) && in ppl_sector_store()
3554 if (rdev->mddev->pers && test_bit(MD_HAS_PPL, &rdev->mddev->flags) && in ppl_size_store()
3903 p = mddev->pers; in level_show()
3922 struct md_personality *pers, *oldpers; in level_store() local
3934 if (mddev->pers == NULL) { in level_store()
3961 if (!mddev->pers->quiesce) { in level_store()
3963 mdname(mddev), mddev->pers->name); in level_store()
3978 pers = find_pers(level, clevel); in level_store()
3979 if (!pers || !try_module_get(pers->owner)) { in level_store()
3987 if (pers == mddev->pers) { in level_store()
3989 module_put(pers->owner); in level_store()
3993 if (!pers->takeover) { in level_store()
3994 module_put(pers->owner); in level_store()
4007 priv = pers->takeover(mddev); in level_store()
4015 module_put(pers->owner); in level_store()
4027 oldpers = mddev->pers; in level_store()
4029 mddev->pers = pers; in level_store()
4031 strscpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); in level_store()
4057 pers->sync_request != NULL) { in level_store()
4067 pers->sync_request == NULL) { in level_store()
4099 if (pers->sync_request == NULL) { in level_store()
4107 pers->run(mddev); in level_store()
4147 if (mddev->pers) { in layout_store()
4148 if (mddev->pers->check_reshape == NULL) in layout_store()
4154 err = mddev->pers->check_reshape(mddev); in layout_store()
4196 if (mddev->pers) in raid_disks_store()
4256 if (mddev->pers) { in chunk_size_store()
4257 if (mddev->pers->check_reshape == NULL) in chunk_size_store()
4263 err = mddev->pers->check_reshape(mddev); in chunk_size_store()
4305 if (mddev->pers && !test_bit(MD_RECOVERY_FROZEN, &mddev->recovery)) in resync_start_store()
4310 if (mddev->pers) in resync_start_store()
4380 if (mddev->pers && !test_bit(MD_NOT_READY, &mddev->flags)) { in array_state_show()
4424 if (mddev->pers && (st == active || st == clean) && in array_state_store()
4458 if (mddev->pers) in array_state_store()
4466 if (mddev->pers) in array_state_store()
4475 if (mddev->pers) { in array_state_store()
4490 if (mddev->pers) { in array_state_store()
4502 if (mddev->pers) { in array_state_store()
4686 if (mddev->pers) { in size_store()
4873 if (!mddev->pers || !mddev->pers->sync_request) in action_store()
4890 if (mddev->pers->start_reshape == NULL) in action_store()
4897 mddev->pers->check_reshape == NULL || in action_store()
4898 mddev->pers->check_reshape(mddev)) { in action_store()
4900 err = mddev->pers->start_reshape(mddev); in action_store()
5203 if (mddev->pers == NULL || in suspend_lo_store()
5204 mddev->pers->quiesce == NULL) in suspend_lo_store()
5240 if (mddev->pers == NULL) in suspend_hi_store()
5281 if (mddev->pers) in reshape_position_store()
5369 if (mddev->pers) in array_size_store()
5370 sectors = mddev->pers->size(mddev, 0, 0); in array_size_store()
5378 else if (mddev->pers && mddev->pers->size(mddev, 0, 0) < sectors) in array_size_store()
5386 if (mddev->pers) in array_size_store()
5409 } else if (mddev->pers) { in consistency_policy_show()
5410 if (mddev->pers->sync_request) in consistency_policy_show()
5426 if (mddev->pers) { in consistency_policy_store()
5427 if (mddev->pers->change_consistency_policy) in consistency_policy_store()
5428 err = mddev->pers->change_consistency_policy(mddev, buf); in consistency_policy_store()
5474 if (mddev->pers == NULL || (mddev->pers->level != 1)) in serialize_policy_show()
5500 if (mddev->pers == NULL || (mddev->pers->level != 1)) { in serialize_policy_store()
5850 struct md_personality *pers; in md_run() local
5857 if (mddev->pers) in md_run()
5949 pers = find_pers(mddev->level, mddev->clevel); in md_run()
5950 if (!pers || !try_module_get(pers->owner)) { in md_run()
5962 if (mddev->level != pers->level) { in md_run()
5963 mddev->level = pers->level; in md_run()
5964 mddev->new_level = pers->level; in md_run()
5966 strscpy(mddev->clevel, pers->name, sizeof(mddev->clevel)); in md_run()
5969 pers->start_reshape == NULL) { in md_run()
5971 module_put(pers->owner); in md_run()
5976 if (pers->sync_request) { in md_run()
6009 err = pers->run(mddev); in md_run()
6012 else if (pers->size(mddev, 0, 0) < mddev->array_sectors) { in md_run()
6018 (unsigned long long)pers->size(mddev, 0, 0) / 2); in md_run()
6021 if (err == 0 && pers->sync_request && in md_run()
6077 if (pers->sync_request) { in md_run()
6098 mddev->pers = pers; in md_run()
6120 pers->free(mddev, mddev->private); in md_run()
6122 module_put(pers->owner); in md_run()
6175 if (mddev->pers->start) { in md_start()
6178 ret = mddev->pers->start(mddev); in md_start()
6196 if (!mddev->pers) in restart_array()
6297 if (mddev->pers && mddev->pers->quiesce) { in __md_stop_writes()
6298 mddev->pers->quiesce(mddev, 1); in __md_stop_writes()
6299 mddev->pers->quiesce(mddev, 0); in __md_stop_writes()
6327 if (mddev->pers && mddev->pers->quiesce && !is_md_suspended(mddev)) { in mddev_detach()
6328 mddev->pers->quiesce(mddev, 1); in mddev_detach()
6329 mddev->pers->quiesce(mddev, 0); in mddev_detach()
6338 struct md_personality *pers = mddev->pers; in __md_stop() local
6345 mddev->pers = NULL; in __md_stop()
6348 pers->free(mddev, mddev->private); in __md_stop()
6350 if (pers->sync_request && mddev->to_remove == NULL) in __md_stop()
6352 module_put(pers->owner); in __md_stop()
6405 if ((mddev->pers && atomic_read(&mddev->openers) > !!bdev) || in md_set_readonly()
6413 if (mddev->pers) { in md_set_readonly()
6426 if ((mddev->pers && !err) || did_freeze) { in md_set_readonly()
6469 if ((mddev->pers && atomic_read(&mddev->openers) > !!bdev) || in do_md_stop()
6482 if (mddev->pers) { in do_md_stop()
6835 if (mddev->pers) { in md_add_new_disk()
6837 if (!mddev->pers->hot_add_disk) { in md_add_new_disk()
6995 if (!mddev->pers) in hot_remove_disk()
7037 if (!mddev->pers) in hot_add_disk()
7045 if (!mddev->pers->hot_add_disk) { in hot_add_disk()
7116 if (mddev->pers) { in set_bitmap_file()
7117 if (!mddev->pers->quiesce || !mddev->thread) in set_bitmap_file()
7170 if (mddev->pers) { in set_bitmap_file()
7310 if (mddev->pers->resize == NULL) in update_size()
7335 rv = mddev->pers->resize(mddev, num_sectors); in update_size()
7352 if (mddev->pers->check_reshape == NULL) in update_raid_disks()
7380 rv = mddev->pers->check_reshape(mddev); in update_raid_disks()
7437 if (mddev->pers->check_reshape == NULL) in update_array_info()
7441 rv = mddev->pers->check_reshape(mddev); in update_array_info()
7454 if (mddev->pers->quiesce == NULL || mddev->thread == NULL) { in update_array_info()
7528 if (mddev->pers == NULL) in set_disk_faulty()
7594 if (mddev->pers) { in __md_set_array_info()
7686 if (mddev->pers && atomic_read(&mddev->openers) > 1) { in md_ioctl()
7749 if (mddev->pers) { in md_ioctl()
7767 if (!md_is_rdwr(mddev) && mddev->pers) { in md_ioctl()
7871 if (!ro && mddev->ro == MD_RDONLY && mddev->pers) { in md_set_read_only()
8076 if (!mddev->pers || !mddev->pers->error_handler) in md_error()
8078 mddev->pers->error_handler(mddev, rdev); in md_error()
8080 if (mddev->pers->level == 0 || mddev->pers->level == LEVEL_LINEAR) in md_error()
8338 struct md_personality *pers; in md_seq_show() local
8341 list_for_each_entry(pers, &pers_list, list) in md_seq_show()
8342 seq_printf(seq, "[%s] ", pers->name); in md_seq_show()
8355 if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) { in md_seq_show()
8357 mddev->pers ? "" : "in"); in md_seq_show()
8358 if (mddev->pers) { in md_seq_show()
8363 seq_printf(seq, " %s", mddev->pers->name); in md_seq_show()
8388 if (mddev->pers) in md_seq_show()
8409 if (mddev->pers) { in md_seq_show()
8410 mddev->pers->status(seq, mddev); in md_seq_show()
8412 if (mddev->pers->sync_request) { in md_seq_show()
8766 if (!mddev->pers) in md_allow_write()
8770 if (!mddev->pers->sync_request) in md_allow_write()
8963 mddev->pers->quiesce(mddev, 1); in md_do_sync()
8964 mddev->pers->quiesce(mddev, 0); in md_do_sync()
9048 sectors = mddev->pers->sync_request(mddev, j, &skipped); in md_do_sync()
9138 mddev->pers->sync_request(mddev, max_sectors, &skipped); in md_do_sync()
9185 mddev->pers->finish_reshape && in md_do_sync()
9186 mddev->pers->size && in md_do_sync()
9189 md_set_array_sectors(mddev, mddev->pers->size(mddev, 0, 0)); in md_do_sync()
9253 if (mddev->pers->hot_remove_disk( in remove_and_add_spares()
9293 if (mddev->pers->hot_add_disk(mddev, rdev) == 0) { in remove_and_add_spares()
9377 if (mddev->pers->sync_request && !mddev->external) { in md_check_recovery()
9497 if (mddev->pers->check_reshape == NULL || in md_check_recovery()
9498 mddev->pers->check_reshape(mddev) != 0) in md_check_recovery()
9515 if (mddev->pers->sync_request) { in md_check_recovery()
9558 if (mddev->pers->spare_active(mddev)) { in md_reap_sync_thread()
9564 mddev->pers->finish_reshape) { in md_reap_sync_thread()
9565 mddev->pers->finish_reshape(mddev); in md_reap_sync_thread()
9688 if (mddev->pers) in md_notify_reboot()
9780 ret = mddev->pers->resize(mddev, le64_to_cpu(sb->size)); in check_sb_changes()
9852 if (mddev->pers->update_reshape_pos) in check_sb_changes()
9853 mddev->pers->update_reshape_pos(mddev); in check_sb_changes()
9854 if (mddev->pers->start_reshape) in check_sb_changes()
9855 mddev->pers->start_reshape(mddev); in check_sb_changes()
9861 if (mddev->pers->update_reshape_pos) in check_sb_changes()
9862 mddev->pers->update_reshape_pos(mddev); in check_sb_changes()
9909 mddev->pers->spare_active(mddev)) in read_rdev()