/drivers/md/ |
D | md.c | 90 static int remove_and_add_spares(struct mddev *mddev, 92 static void mddev_detach(struct mddev *mddev); 117 static inline int speed_min(struct mddev *mddev) in speed_min() argument 119 return mddev->sync_speed_min ? in speed_min() 120 mddev->sync_speed_min : sysctl_speed_limit_min; in speed_min() 123 static inline int speed_max(struct mddev *mddev) in speed_max() argument 125 return mddev->sync_speed_max ? in speed_max() 126 mddev->sync_speed_max : sysctl_speed_limit_max; in speed_max() 138 static void rdevs_uninit_serial(struct mddev *mddev) in rdevs_uninit_serial() argument 142 rdev_for_each(rdev, mddev) in rdevs_uninit_serial() [all …]
|
D | md.h | 52 struct mddev *mddev; /* RAID array if running */ member 283 struct mddev { struct 503 void (*sync_super)(struct mddev *mddev, struct md_rdev *rdev); argument 532 static inline int __must_check mddev_lock(struct mddev *mddev) in mddev_lock() argument 534 return mutex_lock_interruptible(&mddev->reconfig_mutex); in mddev_lock() 540 static inline void mddev_lock_nointr(struct mddev *mddev) in mddev_lock_nointr() argument 542 mutex_lock(&mddev->reconfig_mutex); in mddev_lock_nointr() 545 static inline int mddev_trylock(struct mddev *mddev) in mddev_trylock() argument 547 return mutex_trylock(&mddev->reconfig_mutex); in mddev_trylock() 549 extern void mddev_unlock(struct mddev *mddev); [all …]
|
D | raid0.c | 35 static void dump_zones(struct mddev *mddev) in dump_zones() argument 41 struct r0conf *conf = mddev->private; in dump_zones() 44 mdname(mddev), in dump_zones() 65 static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) in create_strip_zones() argument 80 rdev_for_each(rdev1, mddev) { in create_strip_zones() 82 mdname(mddev), in create_strip_zones() 88 sector_div(sectors, mddev->chunk_sectors); in create_strip_zones() 89 rdev1->sectors = sectors * mddev->chunk_sectors; in create_strip_zones() 94 rdev_for_each(rdev2, mddev) { in create_strip_zones() 97 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 76 rdev_for_each(rdev, mddev) { in linear_conf() 83 mdname(mddev)); in linear_conf() 88 if (mddev->chunk_sectors) { in linear_conf() 90 sector_div(sectors, mddev->chunk_sectors); in linear_conf() [all …]
|
D | md-bitmap.c | 37 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname() 142 static int read_sb_page(struct mddev *mddev, loff_t offset, in read_sb_page() argument 151 rdev_for_each(rdev, mddev) { in read_sb_page() 169 static struct md_rdev *next_active_rdev(struct md_rdev *rdev, struct mddev *mddev) in next_active_rdev() argument 187 rdev = list_entry(&mddev->disks, struct md_rdev, same_set); in next_active_rdev() 190 rdev_dec_pending(rdev, mddev); in next_active_rdev() 192 list_for_each_entry_continue_rcu(rdev, &mddev->disks, same_set) { in next_active_rdev() 209 struct mddev *mddev = bitmap->mddev; in write_sb_page() local 214 while ((rdev = next_active_rdev(rdev, mddev)) != NULL) { in write_sb_page() 216 loff_t offset = mddev->bitmap_info.offset; in write_sb_page() [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() 91 md_error (mp_bh->mddev, rdev); in multipath_end_request() 98 rdev_dec_pending(rdev, conf->mddev); in multipath_end_request() 101 static bool multipath_make_request(struct mddev *mddev, struct bio * bio) in multipath_make_request() argument 103 struct mpconf *conf = mddev->private; in multipath_make_request() 108 && md_flush_request(mddev, bio)) in multipath_make_request() [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); 129 if (test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery) || in r10buf_pool_alloc() 130 test_bit(MD_RECOVERY_RESHAPE, &conf->mddev->recovery)) in r10buf_pool_alloc() 174 &conf->mddev->recovery)) { in r10buf_pool_alloc() 255 struct r10conf *conf = r10_bio->mddev->private; in free_r10bio() 263 struct r10conf *conf = r10_bio->mddev->private; in put_buf() 273 struct mddev *mddev = r10_bio->mddev; in reschedule_retry() local 274 struct r10conf *conf = mddev->private; in reschedule_retry() 284 md_wakeup_thread(mddev->thread); in reschedule_retry() [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() 179 if (test_bit(MD_RECOVERY_REQUESTED, &pi->mddev->recovery)) in r1buf_pool_alloc() 251 struct r1conf *conf = r1_bio->mddev->private; in free_r1bio() 259 struct r1conf *conf = r1_bio->mddev->private; in put_buf() 266 rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev); in put_buf() 277 struct mddev *mddev = r1_bio->mddev; in reschedule_retry() local [all …]
|
D | raid5.c | 190 md_wakeup_thread(conf->mddev->thread); in raid5_wakeup_stripe_thread() 262 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 268 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 349 md_wakeup_thread(conf->mddev->thread); in release_inactive_stripe_list() 395 if (unlikely(!conf->mddev->thread) || in raid5_release_stripe() 400 md_wakeup_thread(conf->mddev->thread); in raid5_release_stripe() 691 int degraded = conf->mddev->degraded; in has_failed() 693 if (test_bit(MD_BROKEN, &conf->mddev->flags)) in has_failed() 696 if (conf->mddev->reshape_position != MaxSector) in has_failed() 909 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() 208 struct bio *b = bio_clone_fast(bio, GFP_NOIO, &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 407 md_error(ppl_conf->mddev, log->rdev); in ppl_log_endio() 557 struct r5conf *conf = ppl_conf->mddev->private; in ppl_io_unit_finished() 592 struct r5conf *conf = ppl_conf->mddev->private; in ppl_flush_endio() 601 rdev = md_find_rdev_rcu(conf->mddev, bio_dev(bio)); in ppl_flush_endio() 603 md_error(rdev->mddev, rdev); in ppl_flush_endio() 611 md_wakeup_thread(conf->mddev->thread); in ppl_flush_endio() 619 struct r5conf *conf = ppl_conf->mddev->private; in ppl_do_flush() 799 struct mddev *mddev = ppl_conf->mddev; in ppl_recover_entry() local 800 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 | raid1.h | 64 struct mddev *mddev; member 69 struct mddev *mddev; member 161 struct mddev *mddev; member
|
D | md-autodetect.c | 129 struct mddev *mddev; in md_setup_drive() local 184 mddev = bdev->bd_disk->private_data; in md_setup_drive() 186 err = mddev_lock(mddev); in md_setup_drive() 192 if (!list_empty(&mddev->disks) || mddev->raid_disks) { in md_setup_drive() 209 err = md_set_array_info(mddev, &ainfo); in md_setup_drive() 224 md_add_new_disk(mddev, &dinfo); in md_setup_drive() 228 err = do_md_run(mddev); in md_setup_drive() 232 mddev_unlock(mddev); in md_setup_drive()
|
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.h | 566 struct mddev *mddev; member 802 extern int raid5_set_cache_size(struct mddev *mddev, int size); 812 extern int r5c_journal_mode_set(struct mddev *mddev, int journal_mode);
|
D | raid5-log.h | 32 extern void r5c_update_on_rdev_error(struct mddev *mddev, 52 return test_bit(MD_HAS_JOURNAL, &conf->mddev->flags); in raid5_has_log() 57 return test_bit(MD_HAS_PPL, &conf->mddev->flags); in raid5_has_ppl()
|