Lines Matching defs:mddev
138 static int speed_min(struct mddev *mddev) in speed_min()
144 static int speed_max(struct mddev *mddev) in speed_max()
150 static int sync_io_depth(struct mddev *mddev) in sync_io_depth()
165 static void rdevs_uninit_serial(struct mddev *mddev) in rdevs_uninit_serial()
201 static int rdevs_init_serial(struct mddev *mddev) in rdevs_init_serial()
236 void mddev_create_serial_pool(struct mddev *mddev, struct md_rdev *rdev) in mddev_create_serial_pool()
272 void mddev_destroy_serial_pool(struct mddev *mddev, struct md_rdev *rdev) in mddev_destroy_serial_pool()
369 static bool is_md_suspended(struct mddev *mddev) in is_md_suspended()
380 static bool is_suspended(struct mddev *mddev, struct bio *bio) in is_suspended()
395 bool md_handle_request(struct mddev *mddev, struct bio *bio) in md_handle_request()
432 struct mddev *mddev = bio->bi_bdev->bd_disk->private_data; in md_submit_bio() local
465 int mddev_suspend(struct mddev *mddev, bool interruptible) in mddev_suspend()
517 static void __mddev_resume(struct mddev *mddev, bool recovery_needed) in __mddev_resume()
542 void mddev_resume(struct mddev *mddev) in mddev_resume()
549 static int mddev_set_closing_and_sync_blockdev(struct mddev *mddev, int opener_num) in mddev_set_closing_and_sync_blockdev()
586 bool md_flush_request(struct mddev *mddev, struct bio *bio) in md_flush_request()
621 static inline struct mddev *mddev_get(struct mddev *mddev) in mddev_get()
633 static void __mddev_put(struct mddev *mddev) in __mddev_put()
652 static void mddev_put_locked(struct mddev *mddev) in mddev_put_locked()
658 void mddev_put(struct mddev *mddev) in mddev_put()
672 struct mddev *mddev = container_of(ref, struct mddev, active_io); in active_io_release() local
679 int mddev_init(struct mddev *mddev) in mddev_init()
724 void mddev_destroy(struct mddev *mddev) in mddev_destroy()
733 struct mddev *mddev; in mddev_find_locked() local
811 static void mddev_free(struct mddev *mddev) in mddev_free()
823 void mddev_unlock(struct mddev *mddev) in mddev_unlock()
892 struct md_rdev *md_find_rdev_nr_rcu(struct mddev *mddev, int nr) in md_find_rdev_nr_rcu()
904 static struct md_rdev *find_rdev(struct mddev *mddev, dev_t dev) in find_rdev()
915 struct md_rdev *md_find_rdev_rcu(struct mddev *mddev, dev_t dev) in md_find_rdev_rcu()
997 struct mddev *mddev = rdev->mddev; in super_written() local
1019 void md_super_write(struct mddev *mddev, struct md_rdev *rdev, in md_super_write()
1058 int md_super_wait(struct mddev *mddev) in md_super_wait()
1238 int md_check_no_bitmap(struct mddev *mddev) in md_check_no_bitmap()
1350 static u64 md_bitmap_events_cleared(struct mddev *mddev) in md_bitmap_events_cleared()
1366 static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, struct md_rdev *rdev) in super_90_validate()
1492 static void super_90_sync(struct mddev *mddev, struct md_rdev *rdev) in super_90_sync()
1870 static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struct md_rdev *rdev) in super_1_validate()
2073 static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev) in super_1_sync()
2331 struct mddev *mddev = rdev->mddev; in super_1_allow_new_offset() local
2368 static void sync_super(struct mddev *mddev, struct md_rdev *rdev) in sync_super()
2414 int md_integrity_register(struct mddev *mddev) in md_integrity_register()
2432 static int bind_rdev_to_array(struct md_rdev *rdev, struct mddev *mddev) in bind_rdev_to_array()
2524 static void export_rdev(struct md_rdev *rdev, struct mddev *mddev) in export_rdev()
2539 struct mddev *mddev = rdev->mddev; in md_kick_rdev_from_array() local
2565 static void export_array(struct mddev *mddev) in export_array()
2578 static bool set_in_sync(struct mddev *mddev) in set_in_sync()
2605 static void sync_sbs(struct mddev *mddev, int nospares) in sync_sbs()
2628 static bool does_sb_need_changing(struct mddev *mddev) in does_sb_need_changing()
2669 void md_update_sb(struct mddev *mddev, int force_change) in md_update_sb()
2858 struct mddev *mddev = rdev->mddev; in add_bound_rdev() local
2971 struct mddev *mddev = rdev->mddev; in state_store() local
3281 struct mddev *mddev = rdev->mddev; in new_offset_store() local
3346 struct mddev *mddev; in md_rdev_overlaps() local
3617 struct mddev *mddev = READ_ONCE(rdev->mddev); in rdev_attr_store() local
3771 static int analyze_sbs(struct mddev *mddev) in analyze_sbs()
3867 safe_delay_show(struct mddev *mddev, char *page) in safe_delay_show()
3874 safe_delay_store(struct mddev *mddev, const char *cbuf, size_t len) in safe_delay_store()
3903 level_show(struct mddev *mddev, char *page) in level_show()
3922 level_store(struct mddev *mddev, const char *buf, size_t len) in level_store()
4121 new_level_show(struct mddev *mddev, char *page) in new_level_show()
4127 new_level_store(struct mddev *mddev, const char *buf, size_t len) in new_level_store()
4149 layout_show(struct mddev *mddev, char *page) in layout_show()
4160 layout_store(struct mddev *mddev, const char *buf, size_t len) in layout_store()
4195 raid_disks_show(struct mddev *mddev, char *page) in raid_disks_show()
4209 raid_disks_store(struct mddev *mddev, const char *buf, size_t len) in raid_disks_store()
4250 uuid_show(struct mddev *mddev, char *page) in uuid_show()
4258 chunk_size_show(struct mddev *mddev, char *page) in chunk_size_show()
4269 chunk_size_store(struct mddev *mddev, const char *buf, size_t len) in chunk_size_store()
4304 resync_start_show(struct mddev *mddev, char *page) in resync_start_show()
4312 resync_start_store(struct mddev *mddev, const char *buf, size_t len) in resync_start_store()
4401 array_state_show(struct mddev *mddev, char *page) in array_state_show()
4444 array_state_store(struct mddev *mddev, const char *buf, size_t len) in array_state_store()
4578 max_corrected_read_errors_show(struct mddev *mddev, char *page) { in max_corrected_read_errors_show()
4584 max_corrected_read_errors_store(struct mddev *mddev, const char *buf, size_t len) in max_corrected_read_errors_store()
4603 null_show(struct mddev *mddev, char *page) in null_show()
4609 new_dev_store(struct mddev *mddev, const char *buf, size_t len) in new_dev_store()
4673 bitmap_store(struct mddev *mddev, const char *buf, size_t len) in bitmap_store()
4713 size_show(struct mddev *mddev, char *page) in size_show()
4722 size_store(struct mddev *mddev, const char *buf, size_t len) in size_store()
4761 metadata_show(struct mddev *mddev, char *page) in metadata_show()
4773 metadata_store(struct mddev *mddev, const char *buf, size_t len) in metadata_store()
4838 enum sync_action md_sync_action(struct mddev *mddev) in md_sync_action()
4908 action_show(struct mddev *mddev, char *page) in action_show()
4922 static void stop_sync_thread(struct mddev *mddev, bool locked) in stop_sync_thread()
4952 void md_idle_sync_thread(struct mddev *mddev) in md_idle_sync_thread()
4961 void md_frozen_sync_thread(struct mddev *mddev) in md_frozen_sync_thread()
4970 void md_unfrozen_sync_thread(struct mddev *mddev) in md_unfrozen_sync_thread()
4981 static int mddev_start_reshape(struct mddev *mddev) in mddev_start_reshape()
5009 action_store(struct mddev *mddev, const char *page, size_t len) in action_store()
5108 last_sync_action_show(struct mddev *mddev, char *page) in last_sync_action_show()
5117 mismatch_cnt_show(struct mddev *mddev, char *page) in mismatch_cnt_show()
5127 sync_min_show(struct mddev *mddev, char *page) in sync_min_show()
5134 sync_min_store(struct mddev *mddev, const char *buf, size_t len) in sync_min_store()
5156 sync_max_show(struct mddev *mddev, char *page) in sync_max_show()
5163 sync_max_store(struct mddev *mddev, const char *buf, size_t len) in sync_max_store()
5185 sync_io_depth_show(struct mddev *mddev, char *page) in sync_io_depth_show()
5192 sync_io_depth_store(struct mddev *mddev, const char *buf, size_t len) in sync_io_depth_store()
5214 degraded_show(struct mddev *mddev, char *page) in degraded_show()
5221 sync_force_parallel_show(struct mddev *mddev, char *page) in sync_force_parallel_show()
5227 sync_force_parallel_store(struct mddev *mddev, const char *buf, size_t len) in sync_force_parallel_store()
5251 sync_speed_show(struct mddev *mddev, char *page) in sync_speed_show()
5266 sync_completed_show(struct mddev *mddev, char *page) in sync_completed_show()
5291 min_sync_show(struct mddev *mddev, char *page) in min_sync_show()
5297 min_sync_store(struct mddev *mddev, const char *buf, size_t len) in min_sync_store()
5327 max_sync_show(struct mddev *mddev, char *page) in max_sync_show()
5336 max_sync_store(struct mddev *mddev, const char *buf, size_t len) in max_sync_store()
5379 suspend_lo_show(struct mddev *mddev, char *page) in suspend_lo_show()
5386 suspend_lo_store(struct mddev *mddev, const char *buf, size_t len) in suspend_lo_store()
5410 suspend_hi_show(struct mddev *mddev, char *page) in suspend_hi_show()
5417 suspend_hi_store(struct mddev *mddev, const char *buf, size_t len) in suspend_hi_store()
5441 reshape_position_show(struct mddev *mddev, char *page) in reshape_position_show()
5451 reshape_position_store(struct mddev *mddev, const char *buf, size_t len) in reshape_position_store()
5487 reshape_direction_show(struct mddev *mddev, char *page) in reshape_direction_show()
5494 reshape_direction_store(struct mddev *mddev, const char *buf, size_t len) in reshape_direction_store()
5528 array_size_show(struct mddev *mddev, char *page) in array_size_show()
5538 array_size_store(struct mddev *mddev, const char *buf, size_t len) in array_size_store()
5584 consistency_policy_show(struct mddev *mddev, char *page) in consistency_policy_show()
5607 consistency_policy_store(struct mddev *mddev, const char *buf, size_t len) in consistency_policy_store()
5629 static ssize_t fail_last_dev_show(struct mddev *mddev, char *page) in fail_last_dev_show()
5639 fail_last_dev_store(struct mddev *mddev, const char *buf, size_t len) in fail_last_dev_store()
5657 static ssize_t serialize_policy_show(struct mddev *mddev, char *page) in serialize_policy_show()
5670 serialize_policy_store(struct mddev *mddev, const char *buf, size_t len) in serialize_policy_store()
5766 struct mddev *mddev = container_of(kobj, struct mddev, kobj); in md_attr_show() local
5788 struct mddev *mddev = container_of(kobj, struct mddev, kobj); in md_attr_store() local
5819 struct mddev *mddev = container_of(ko, struct mddev, kobj); in md_kobj_release() local
5837 int mddev_stack_rdev_limits(struct mddev *mddev, struct queue_limits *lim, in mddev_stack_rdev_limits()
5855 int mddev_stack_new_rdev(struct mddev *mddev, struct md_rdev *rdev) in mddev_stack_new_rdev()
5878 void mddev_update_io_opt(struct mddev *mddev, unsigned int nr_stripes) in mddev_update_io_opt()
5897 struct mddev *mddev = container_of(ws, struct mddev, del_work); in mddev_delayed_delete() local
5922 struct mddev *mddev; in md_alloc() local
6022 struct mddev *mddev = md_alloc(dev, name); in md_alloc_and_put() local
6069 struct mddev *mddev = timer_container_of(mddev, t, safemode_timer); in md_safemode_timeout() local
6080 int md_run(struct mddev *mddev) in md_run()
6330 int do_md_run(struct mddev *mddev) in do_md_run()
6365 int md_start(struct mddev *mddev) in md_start()
6379 static int restart_array(struct mddev *mddev) in restart_array()
6420 static void md_clean(struct mddev *mddev) in md_clean()
6472 static void __md_stop_writes(struct mddev *mddev) in __md_stop_writes()
6496 void md_stop_writes(struct mddev *mddev) in md_stop_writes()
6506 static void mddev_detach(struct mddev *mddev) in mddev_detach()
6520 static void __md_stop(struct mddev *mddev) in __md_stop()
6540 void md_stop(struct mddev *mddev) in md_stop()
6554 static int md_set_readonly(struct mddev *mddev) in md_set_readonly()
6602 static int do_md_stop(struct mddev *mddev, int mode) in do_md_stop()
6669 static void autorun_array(struct mddev *mddev) in autorun_array()
6706 struct mddev *mddev; in autorun_devices() local
6792 static int get_array_info(struct mddev *mddev, void __user *arg) in get_array_info()
6852 static int get_bitmap_file(struct mddev *mddev, void __user * arg) in get_bitmap_file()
6884 static int get_disk_info(struct mddev *mddev, void __user * arg) in get_disk_info()
6924 int md_add_new_disk(struct mddev *mddev, struct mdu_disk_info_s *info) in md_add_new_disk()
7129 static int hot_remove_disk(struct mddev *mddev, dev_t dev) in hot_remove_disk()
7167 static int hot_add_disk(struct mddev *mddev, dev_t dev) in hot_add_disk()
7237 static int set_bitmap_file(struct mddev *mddev, int fd) in set_bitmap_file()
7336 int md_set_array_info(struct mddev *mddev, struct mdu_array_info_s *info) in md_set_array_info()
7410 void md_set_array_sectors(struct mddev *mddev, sector_t array_sectors) in md_set_array_sectors()
7421 static int update_size(struct mddev *mddev, sector_t num_sectors) in update_size()
7463 static int update_raid_disks(struct mddev *mddev, int raid_disks) in update_raid_disks()
7503 static int get_cluster_ops(struct mddev *mddev) in get_cluster_ops()
7515 static void put_cluster_ops(struct mddev *mddev) in put_cluster_ops()
7533 static int update_array_info(struct mddev *mddev, mdu_array_info_t *info) in update_array_info()
7654 static int set_disk_faulty(struct mddev *mddev, dev_t dev) in set_disk_faulty()
7683 struct mddev *mddev = bdev->bd_disk->private_data; in md_getgeo() local
7732 static int __md_set_array_info(struct mddev *mddev, void __user *argp) in __md_set_array_info()
7771 struct mddev *mddev = NULL; in md_ioctl() local
7982 struct mddev *mddev = bdev->bd_disk->private_data; in md_set_read_only() local
8012 struct mddev *mddev; in md_open() local
8044 struct mddev *mddev = disk->private_data; in md_release() local
8053 struct mddev *mddev = disk->private_data; in md_check_events() local
8064 struct mddev *mddev = disk->private_data; in md_free_disk() local
8156 struct mddev *mddev, const char *name) in md_register_thread()
8181 void md_unregister_thread(struct mddev *mddev, struct md_thread __rcu **threadp) in md_unregister_thread()
8198 void md_error(struct mddev *mddev, struct md_rdev *rdev) in md_error()
8260 static int status_resync(struct seq_file *seq, struct mddev *mddev) in status_resync()
8418 static void md_bitmap_status(struct seq_file *seq, struct mddev *mddev) in md_bitmap_status()
8447 struct mddev *mddev; in md_seq_show() local
8611 int md_setup_cluster(struct mddev *mddev, int nodes) in md_setup_cluster()
8632 void md_cluster_stop(struct mddev *mddev) in md_cluster_stop()
8664 static bool is_mddev_idle(struct mddev *mddev, int init) in is_mddev_idle()
8689 void md_done_sync(struct mddev *mddev, int blocks, int ok) in md_done_sync()
8710 void md_write_start(struct mddev *mddev, struct bio *bi) in md_write_start()
8761 void md_write_inc(struct mddev *mddev, struct bio *bi) in md_write_inc()
8770 void md_write_end(struct mddev *mddev) in md_write_end()
8788 void md_submit_discard_bio(struct mddev *mddev, struct md_rdev *rdev, in md_submit_discard_bio()
8804 static void md_bitmap_start(struct mddev *mddev, in md_bitmap_start()
8815 static void md_bitmap_end(struct mddev *mddev, struct md_io_clone *md_io_clone) in md_bitmap_end()
8825 struct mddev *mddev = md_io_clone->mddev; in md_end_clone_io() local
8841 static void md_clone_bio(struct mddev *mddev, struct bio **bio) in md_clone_bio()
8865 void md_account_bio(struct mddev *mddev, struct bio **bio) in md_account_bio()
8876 struct mddev *mddev = md_io_clone->mddev; in md_free_cloned_bio() local
8898 void md_allow_write(struct mddev *mddev) in md_allow_write()
8926 static sector_t md_sync_max_sectors(struct mddev *mddev, in md_sync_max_sectors()
8944 static sector_t md_sync_position(struct mddev *mddev, enum sync_action action) in md_sync_position()
8997 static bool sync_io_within_limit(struct mddev *mddev) in sync_io_within_limit()
9019 struct mddev *mddev = thread->mddev; in md_do_sync() local
9430 struct mddev *mddev; in rdev_addable() local
9459 static bool md_spares_need_change(struct mddev *mddev) in md_spares_need_change()
9474 static int remove_spares(struct mddev *mddev, struct md_rdev *this) in remove_spares()
9495 static int remove_and_add_spares(struct mddev *mddev, in remove_and_add_spares()
9534 static bool md_choose_sync_action(struct mddev *mddev, int *spares) in md_choose_sync_action()
9581 struct mddev *mddev = container_of(ws, struct mddev, sync_work); in md_start_sync() local
9669 static void unregister_sync_thread(struct mddev *mddev) in unregister_sync_thread()
9705 void md_check_recovery(struct mddev *mddev) in md_check_recovery()
9838 void md_reap_sync_thread(struct mddev *mddev) in md_reap_sync_thread()
9903 void md_wait_for_blocked_rdev(struct md_rdev *rdev, struct mddev *mddev) in md_wait_for_blocked_rdev()
9912 void md_finish_reshape(struct mddev *mddev) in md_finish_reshape()
9933 struct mddev *mddev = rdev->mddev; in rdev_set_badblocks() local
9983 struct mddev *mddev; in md_notify_reboot() local
10073 static void check_sb_changes(struct mddev *mddev, struct md_rdev *rdev) in check_sb_changes()
10186 static int read_rdev(struct mddev *mddev, struct md_rdev *rdev) in read_rdev()
10233 void md_reload_sb(struct mddev *mddev, int nr) in md_reload_sb()
10336 struct mddev *mddev; in md_exit() local