/openbmc/linux/drivers/md/ |
H A D | md.c | 88 static int remove_and_add_spares(struct mddev *mddev, 90 static void mddev_detach(struct mddev *mddev); 91 static void export_rdev(struct md_rdev *rdev, 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 [all …]
|
H A D | md.h | 52 struct mddev *mddev; /* RAID array if running */ member 309 struct mddev { struct 533 void (*sync_super)(struct mddev *mddev, struct md_rdev *rdev); argument 580 static inline bool md_is_rdwr(struct mddev *mddev) in md_is_rdwr() argument 582 return (mddev->ro == MD_RDWR); in md_is_rdwr() 585 static inline bool is_md_suspended(struct mddev *mddev) in is_md_suspended() argument 587 return percpu_ref_is_dying(&mddev->active_io); in is_md_suspended() 590 static inline int __must_check mddev_lock(struct mddev *mddev) in mddev_lock() argument 592 return mutex_lock_interruptible(&mddev->reconfig_mutex); in mddev_lock() 598 static inline void mddev_lock_nointr(struct mddev *mddev) in mddev_lock_nointr() argument [all …]
|
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A D | md-bitmap.c | 37 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname() 144 static int read_sb_page(struct mddev *mddev, loff_t offset, in read_sb_page() argument 148 sector_t sector = mddev->bitmap_info.offset + offset + in read_sb_page() 152 rdev_for_each(rdev, mddev) { in read_sb_page() 166 static struct md_rdev *next_active_rdev(struct md_rdev *rdev, struct mddev *mddev) in next_active_rdev() argument 184 rdev = list_entry(&mddev->disks, struct md_rdev, same_set); in next_active_rdev() 187 rdev_dec_pending(rdev, mddev); in next_active_rdev() 189 list_for_each_entry_continue_rcu(rdev, &mddev->disks, same_set) { in next_active_rdev() 228 struct mddev *mddev = bitmap->mddev; in __write_sb_page() local 232 loff_t sboff, offset = mddev->bitmap_info.offset; in __write_sb_page() [all …]
|
H A 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 …]
|
H A D | dm-raid.c | 244 struct mddev md; 262 struct mddev *mddev = &rs->md; in rs_config_backup() local 264 l->new_level = mddev->new_level; in rs_config_backup() 265 l->new_layout = mddev->new_layout; in rs_config_backup() 266 l->new_chunk_sectors = mddev->new_chunk_sectors; in rs_config_backup() 271 struct mddev *mddev = &rs->md; in rs_config_restore() local 273 mddev->new_level = l->new_level; in rs_config_restore() 274 mddev->new_layout = l->new_layout; in rs_config_restore() 275 mddev->new_chunk_sectors = l->new_chunk_sectors; in rs_config_restore() 685 struct mddev *mddev = &rs->md; in rs_set_rdev_sectors() local [all …]
|
H A 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 …]
|
H A D | raid5.c | 197 md_wakeup_thread(conf->mddev->thread); in raid5_wakeup_stripe_thread() 270 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 276 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 358 md_wakeup_thread(conf->mddev->thread); in release_inactive_stripe_list() 404 if (unlikely(!conf->mddev->thread) || in raid5_release_stripe() 409 md_wakeup_thread(conf->mddev->thread); in raid5_release_stripe() 747 int degraded = conf->mddev->degraded; in has_failed() 749 if (test_bit(MD_BROKEN, &conf->mddev->flags)) in has_failed() 752 if (conf->mddev->reshape_position != MaxSector) in has_failed() 989 md_wakeup_thread(conf->mddev->thread); in stripe_add_to_batch_list() [all …]
|
H A D | md-bitmap.h | 195 struct mddev *mddev; /* the md device that the bitmap is for */ member 247 struct bitmap *md_bitmap_create(struct mddev *mddev, int slot); 248 int md_bitmap_load(struct mddev *mddev); 249 void md_bitmap_flush(struct mddev *mddev); 250 void md_bitmap_destroy(struct mddev *mddev); 266 void md_bitmap_start_behind_write(struct mddev *mddev); 267 void md_bitmap_end_behind_write(struct mddev *mddev); 272 void md_bitmap_sync_with_cluster(struct mddev *mddev, 278 void md_bitmap_daemon_work(struct mddev *mddev); 282 struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot); [all …]
|
H A 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 md_account_bio(mddev, &bio); in faulty_make_request() 211 &mddev->bio_set); in faulty_make_request() 223 static void faulty_status(struct seq_file *seq, struct mddev *mddev) in faulty_status() argument 225 struct faulty_conf *conf = mddev->private; in faulty_status() 256 static int faulty_reshape(struct mddev *mddev) in faulty_reshape() argument 258 int mode = mddev->new_layout & ModeMask; in faulty_reshape() 259 int count = mddev->new_layout >> ModeShift; in faulty_reshape() 260 struct faulty_conf *conf = mddev->private; in faulty_reshape() [all …]
|
H A 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 …]
|
H A D | raid5-cache.c | 301 md_write_end(conf->mddev); in r5c_return_dev_pending_writes() 417 struct r5conf *conf = log->rdev->mddev->private; in r5c_update_log_state() 567 md_error(log->rdev->mddev, log->rdev); in r5l_log_endio() 602 md_wakeup_thread(log->rdev->mddev->thread); in r5l_log_endio() 683 struct mddev *mddev = log->rdev->mddev; in r5c_disable_writeback_async() local 684 struct r5conf *conf = mddev->private; in r5c_disable_writeback_async() 690 mdname(mddev)); in r5c_disable_writeback_async() 693 wait_event(mddev->sb_wait, in r5c_disable_writeback_async() 695 (!test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags) && in r5c_disable_writeback_async() 696 (locked = mddev_trylock(mddev)))); in r5c_disable_writeback_async() [all …]
|
H A D | md-autodetect.c | 128 struct mddev *mddev; in md_setup_drive() local 172 mddev = md_alloc(mdev, name); in md_setup_drive() 173 if (IS_ERR(mddev)) { in md_setup_drive() 178 err = mddev_lock(mddev); in md_setup_drive() 184 if (!list_empty(&mddev->disks) || mddev->raid_disks) { in md_setup_drive() 201 err = md_set_array_info(mddev, &ainfo); in md_setup_drive() 216 md_add_new_disk(mddev, &dinfo); in md_setup_drive() 220 err = do_md_run(mddev); in md_setup_drive() 224 mddev_unlock(mddev); in md_setup_drive() 226 mddev_put(mddev); in md_setup_drive()
|
H A D | raid1.h | 64 struct mddev *mddev; member 69 struct mddev *mddev; member 160 struct mddev *mddev; member
|
H A D | md-multipath.h | 10 struct mddev *mddev; member 26 struct mddev *mddev; member
|
H A D | raid10.h | 29 struct mddev *mddev; member 126 struct mddev *mddev; member
|
H A D | raid1-10.c | 133 static inline bool raid1_add_bio_to_plug(struct mddev *mddev, struct bio *bio, in raid1_add_bio_to_plug() argument 143 if (!md_bitmap_enabled(mddev->bitmap)) { in raid1_add_bio_to_plug() 148 cb = blk_check_plugged(unplug, mddev, sizeof(*plug)); in raid1_add_bio_to_plug()
|
H A D | raid5.h | 574 struct mddev *mddev; member 803 int raid5_set_cache_size(struct mddev *mddev, int size); 821 int r5c_journal_mode_set(struct mddev *mddev, int journal_mode);
|
H A 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()
|