/linux-6.1.9/drivers/md/ |
D | md.c | 92 static int remove_and_add_spares(struct mddev *mddev, 94 static void mddev_detach(struct mddev *mddev); 119 static inline int speed_min(struct mddev *mddev) in speed_min() argument 121 return mddev->sync_speed_min ? in speed_min() 122 mddev->sync_speed_min : sysctl_speed_limit_min; in speed_min() 125 static inline int speed_max(struct mddev *mddev) in speed_max() argument 127 return mddev->sync_speed_max ? in speed_max() 128 mddev->sync_speed_max : sysctl_speed_limit_max; in speed_max() 140 static void rdevs_uninit_serial(struct mddev *mddev) in rdevs_uninit_serial() argument 144 rdev_for_each(rdev, mddev) in rdevs_uninit_serial() [all …]
|
D | md.h | 52 struct mddev *mddev; /* RAID array if running */ member 308 struct mddev { struct 529 void (*sync_super)(struct mddev *mddev, struct md_rdev *rdev); argument 558 static inline int __must_check mddev_lock(struct mddev *mddev) in mddev_lock() argument 560 return mutex_lock_interruptible(&mddev->reconfig_mutex); in mddev_lock() 566 static inline void mddev_lock_nointr(struct mddev *mddev) in mddev_lock_nointr() argument 568 mutex_lock(&mddev->reconfig_mutex); in mddev_lock_nointr() 571 static inline int mddev_trylock(struct mddev *mddev) in mddev_trylock() argument 573 return mutex_trylock(&mddev->reconfig_mutex); in mddev_trylock() 575 extern void mddev_unlock(struct mddev *mddev); [all …]
|
D | raid0.c | 35 static void dump_zones(struct mddev *mddev) in dump_zones() argument 40 struct r0conf *conf = mddev->private; in dump_zones() 43 mdname(mddev), in dump_zones() 63 static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) in create_strip_zones() argument 76 rdev_for_each(rdev1, mddev) { in create_strip_zones() 78 mdname(mddev), in create_strip_zones() 84 sector_div(sectors, mddev->chunk_sectors); in create_strip_zones() 85 rdev1->sectors = sectors * mddev->chunk_sectors; in create_strip_zones() 90 rdev_for_each(rdev2, mddev) { in create_strip_zones() 93 mdname(mddev), in create_strip_zones() [all …]
|
D | md-cluster.h | 9 struct mddev; 13 int (*join)(struct mddev *mddev, int nodes); 14 int (*leave)(struct mddev *mddev); 15 int (*slot_number)(struct mddev *mddev); 16 int (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi); 17 void (*resync_info_get)(struct mddev *mddev, sector_t *lo, sector_t *hi); 18 int (*metadata_update_start)(struct mddev *mddev); 19 int (*metadata_update_finish)(struct mddev *mddev); 20 void (*metadata_update_cancel)(struct mddev *mddev); 21 int (*resync_start)(struct mddev *mddev); [all …]
|
D | md-cluster.c | 27 struct mddev *mddev; /* pointing back to mddev. */ member 61 struct mddev *mddev; /* the md device which md_cluster_info belongs to */ member 150 struct mddev *mddev) in dlm_lock_sync_interruptible() argument 162 || test_bit(MD_CLOSING, &mddev->flags)); in dlm_lock_sync_interruptible() 183 static struct dlm_lock_resource *lockres_init(struct mddev *mddev, in lockres_init() argument 188 struct md_cluster_info *cinfo = mddev->cluster_info; in lockres_init() 196 res->mddev = mddev; in lockres_init() 268 static int read_resync_info(struct mddev *mddev, in read_resync_info() argument 272 struct md_cluster_info *cinfo = mddev->cluster_info; in read_resync_info() 288 struct mddev *mddev = thread->mddev; in recover_bitmaps() local [all …]
|
D | md-linear.c | 24 static inline struct dev_info *which_dev(struct mddev *mddev, sector_t sector) in which_dev() argument 30 hi = mddev->raid_disks - 1; in which_dev() 31 conf = mddev->private; in which_dev() 49 static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disks) in linear_size() argument 54 conf = mddev->private; in linear_size() 62 static struct linear_conf *linear_conf(struct mddev *mddev, int raid_disks) in linear_conf() argument 75 rdev_for_each(rdev, mddev) { in linear_conf() 82 mdname(mddev)); in linear_conf() 87 if (mddev->chunk_sectors) { in linear_conf() 89 sector_div(sectors, mddev->chunk_sectors); in linear_conf() [all …]
|
D | md-multipath.c | 54 struct mddev *mddev = mp_bh->mddev; in multipath_reschedule_retry() local 55 struct mpconf *conf = mddev->private; in multipath_reschedule_retry() 60 md_wakeup_thread(mddev->thread); in multipath_reschedule_retry() 71 struct mpconf *conf = mp_bh->mddev->private; in multipath_end_bh_io() 81 struct mpconf *conf = mp_bh->mddev->private; in multipath_end_request() 90 md_error (mp_bh->mddev, rdev); in multipath_end_request() 97 rdev_dec_pending(rdev, conf->mddev); in multipath_end_request() 100 static bool multipath_make_request(struct mddev *mddev, struct bio * bio) in multipath_make_request() argument 102 struct mpconf *conf = mddev->private; in multipath_make_request() 107 && md_flush_request(mddev, bio)) in multipath_make_request() [all …]
|
D | md-bitmap.c | 37 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname() 149 static int read_sb_page(struct mddev *mddev, loff_t offset, in read_sb_page() argument 158 rdev_for_each(rdev, mddev) { in read_sb_page() 176 static struct md_rdev *next_active_rdev(struct md_rdev *rdev, struct mddev *mddev) in next_active_rdev() argument 194 rdev = list_entry(&mddev->disks, struct md_rdev, same_set); in next_active_rdev() 197 rdev_dec_pending(rdev, mddev); in next_active_rdev() 199 list_for_each_entry_continue_rcu(rdev, &mddev->disks, same_set) { in next_active_rdev() 216 struct mddev *mddev = bitmap->mddev; in write_sb_page() local 221 while ((rdev = next_active_rdev(rdev, mddev)) != NULL) { in write_sb_page() 223 loff_t offset = mddev->bitmap_info.offset; in write_sb_page() [all …]
|
D | dm-raid.c | 243 struct mddev md; 261 struct mddev *mddev = &rs->md; in rs_config_backup() local 263 l->new_level = mddev->new_level; in rs_config_backup() 264 l->new_layout = mddev->new_layout; in rs_config_backup() 265 l->new_chunk_sectors = mddev->new_chunk_sectors; in rs_config_backup() 270 struct mddev *mddev = &rs->md; in rs_config_restore() local 272 mddev->new_level = l->new_level; in rs_config_restore() 273 mddev->new_layout = l->new_layout; in rs_config_restore() 274 mddev->new_chunk_sectors = l->new_chunk_sectors; in rs_config_restore() 684 struct mddev *mddev = &rs->md; in rs_set_rdev_sectors() local [all …]
|
D | raid1.c | 84 struct mddev *mddev = rdev->mddev; in wait_for_serialization() local 89 if (WARN_ON(!mddev->serial_info_pool)) in wait_for_serialization() 91 si = mempool_alloc(mddev->serial_info_pool, GFP_NOIO); in wait_for_serialization() 101 struct mddev *mddev = rdev->mddev; in remove_serial() local 110 mempool_free(si, mddev->serial_info_pool); in remove_serial() 180 if (test_bit(MD_RECOVERY_REQUESTED, &pi->mddev->recovery)) in r1buf_pool_alloc() 255 struct r1conf *conf = r1_bio->mddev->private; in free_r1bio() 263 struct r1conf *conf = r1_bio->mddev->private; in put_buf() 270 rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev); in put_buf() 281 struct mddev *mddev = r1_bio->mddev; in reschedule_retry() local [all …]
|
D | raid10.c | 71 static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, 73 static void reshape_request_write(struct mddev *mddev, struct r10bio *r10_bio); 144 if (test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery) || in r10buf_pool_alloc() 145 test_bit(MD_RECOVERY_RESHAPE, &conf->mddev->recovery)) in r10buf_pool_alloc() 191 &conf->mddev->recovery)) { in r10buf_pool_alloc() 277 struct r10conf *conf = r10_bio->mddev->private; in free_r10bio() 285 struct r10conf *conf = r10_bio->mddev->private; in put_buf() 301 struct mddev *mddev = r10_bio->mddev; in reschedule_retry() local 302 struct r10conf *conf = mddev->private; in reschedule_retry() 312 md_wakeup_thread(mddev->thread); in reschedule_retry() [all …]
|
D | raid5.c | 198 md_wakeup_thread(conf->mddev->thread); in raid5_wakeup_stripe_thread() 271 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 277 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 359 md_wakeup_thread(conf->mddev->thread); in release_inactive_stripe_list() 405 if (unlikely(!conf->mddev->thread) || in raid5_release_stripe() 410 md_wakeup_thread(conf->mddev->thread); in raid5_release_stripe() 748 int degraded = conf->mddev->degraded; in has_failed() 750 if (test_bit(MD_BROKEN, &conf->mddev->flags)) in has_failed() 753 if (conf->mddev->reshape_position != MaxSector) in has_failed() 984 md_wakeup_thread(conf->mddev->thread); in stripe_add_to_batch_list() [all …]
|
D | md-bitmap.h | 195 struct mddev *mddev; /* the md device that the bitmap is for */ member 239 struct bitmap *md_bitmap_create(struct mddev *mddev, int slot); 240 int md_bitmap_load(struct mddev *mddev); 241 void md_bitmap_flush(struct mddev *mddev); 242 void md_bitmap_destroy(struct mddev *mddev); 262 void md_bitmap_sync_with_cluster(struct mddev *mddev, 267 void md_bitmap_daemon_work(struct mddev *mddev); 271 struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot); 272 int md_bitmap_copy_from_slot(struct mddev *mddev, int slot, 275 void md_bitmap_wait_behind_writes(struct mddev *mddev);
|
D | md-faulty.c | 164 static bool faulty_make_request(struct mddev *mddev, struct bio *bio) in faulty_make_request() argument 166 struct faulty_conf *conf = mddev->private; in faulty_make_request() 209 &mddev->bio_set); in faulty_make_request() 221 static void faulty_status(struct seq_file *seq, struct mddev *mddev) in faulty_status() argument 223 struct faulty_conf *conf = mddev->private; in faulty_status() 254 static int faulty_reshape(struct mddev *mddev) in faulty_reshape() argument 256 int mode = mddev->new_layout & ModeMask; in faulty_reshape() 257 int count = mddev->new_layout >> ModeShift; in faulty_reshape() 258 struct faulty_conf *conf = mddev->private; in faulty_reshape() 260 if (mddev->new_layout < 0) in faulty_reshape() [all …]
|
D | raid5-ppl.c | 88 struct mddev *mddev; member 408 md_error(ppl_conf->mddev, log->rdev); in ppl_log_endio() 551 struct r5conf *conf = ppl_conf->mddev->private; in ppl_io_unit_finished() 586 struct r5conf *conf = ppl_conf->mddev->private; in ppl_flush_endio() 594 rdev = md_find_rdev_rcu(conf->mddev, bio_dev(bio)); in ppl_flush_endio() 596 md_error(rdev->mddev, rdev); in ppl_flush_endio() 604 md_wakeup_thread(conf->mddev->thread); in ppl_flush_endio() 612 struct r5conf *conf = ppl_conf->mddev->private; in ppl_do_flush() 790 struct mddev *mddev = ppl_conf->mddev; in ppl_recover_entry() local 791 struct r5conf *conf = mddev->private; in ppl_recover_entry() [all …]
|
D | raid5-cache.c | 301 md_write_end(conf->mddev); in r5c_return_dev_pending_writes() 316 md_bitmap_endwrite(conf->mddev->bitmap, sh->sector, in r5c_handle_cached_data_endio() 418 struct r5conf *conf = log->rdev->mddev->private; in r5c_update_log_state() 568 md_error(log->rdev->mddev, log->rdev); in r5l_log_endio() 603 md_wakeup_thread(log->rdev->mddev->thread); in r5l_log_endio() 684 struct mddev *mddev = log->rdev->mddev; in r5c_disable_writeback_async() local 685 struct r5conf *conf = mddev->private; in r5c_disable_writeback_async() 691 mdname(mddev)); in r5c_disable_writeback_async() 694 wait_event(mddev->sb_wait, in r5c_disable_writeback_async() 696 (!test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags) && in r5c_disable_writeback_async() [all …]
|
D | md-autodetect.c | 128 struct mddev *mddev; in md_setup_drive() local 171 mddev = md_alloc(mdev, name); in md_setup_drive() 172 if (IS_ERR(mddev)) { in md_setup_drive() 177 err = mddev_lock(mddev); in md_setup_drive() 183 if (!list_empty(&mddev->disks) || mddev->raid_disks) { in md_setup_drive() 200 err = md_set_array_info(mddev, &ainfo); in md_setup_drive() 215 md_add_new_disk(mddev, &dinfo); in md_setup_drive() 219 err = do_md_run(mddev); in md_setup_drive() 223 mddev_unlock(mddev); in md_setup_drive() 225 mddev_put(mddev); in md_setup_drive()
|
D | raid1.h | 64 struct mddev *mddev; member 69 struct mddev *mddev; member 161 struct mddev *mddev; member
|
D | md-multipath.h | 10 struct mddev *mddev; member 26 struct mddev *mddev; member
|
D | raid10.h | 29 struct mddev *mddev; member 127 struct mddev *mddev; member
|
D | raid5-log.h | 30 void r5c_update_on_rdev_error(struct mddev *mddev, struct md_rdev *rdev); 49 return test_bit(MD_HAS_JOURNAL, &conf->mddev->flags); in raid5_has_log() 54 return test_bit(MD_HAS_PPL, &conf->mddev->flags); in raid5_has_ppl()
|
D | raid5.h | 578 struct mddev *mddev; member 807 int raid5_set_cache_size(struct mddev *mddev, int size); 825 int r5c_journal_mode_set(struct mddev *mddev, int journal_mode);
|