| /linux/drivers/md/ |
| H A D | md.c | 97 static int remove_and_add_spares(struct mddev *mddev, 99 static void mddev_detach(struct mddev *mddev); 136 static int speed_min(struct mddev *mddev) in speed_min() argument 138 return mddev->sync_speed_min ? in speed_min() 139 mddev->sync_speed_min : sysctl_speed_limit_min; in speed_min() 142 static int speed_max(struct mddev *mddev) in speed_max() argument 144 return mddev->sync_speed_max ? in speed_max() 145 mddev->sync_speed_max : sysctl_speed_limit_max; in speed_max() 148 static int sync_io_depth(struct mddev *mddev) in sync_io_depth() argument 150 return mddev->sync_io_depth ? in sync_io_depth() [all …]
|
| H A D | md.h | 138 struct mddev *mddev; /* RAID array if running */ member 407 struct mddev { struct 620 void (*sync_super)(struct mddev *mddev, struct md_rdev *rdev); argument 685 static inline bool md_is_rdwr(struct mddev *mddev) in md_is_rdwr() argument 687 return (mddev->ro == MD_RDWR); in md_is_rdwr() 690 static inline bool reshape_interrupted(struct mddev *mddev) in reshape_interrupted() argument 693 if (mddev->reshape_position == MaxSector) in reshape_interrupted() 697 if (!test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) in reshape_interrupted() 701 if (test_bit(MD_RECOVERY_WAIT, &mddev->recovery) || in reshape_interrupted() 702 test_bit(MD_RECOVERY_INTR, &mddev->recovery) || in reshape_interrupted() [all …]
|
| H A D | md-cluster.h | 9 struct mddev; 15 int (*join)(struct mddev *mddev, int nodes); 16 int (*leave)(struct mddev *mddev); 17 int (*slot_number)(struct mddev *mddev); 18 int (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi); 19 int (*resync_start_notify)(struct mddev *mddev); 20 int (*resync_status_get)(struct mddev *mddev); 21 void (*resync_info_get)(struct mddev *mddev, sector_t *lo, sector_t *hi); 22 int (*metadata_update_start)(struct mddev *mddev); 23 int (*metadata_update_finish)(struct mddev *mddev); [all …]
|
| H A D | md-bitmap.h | 81 typedef void (md_bitmap_fn)(struct mddev *mddev, sector_t offset, 88 int (*create)(struct mddev *mddev); 89 int (*resize)(struct mddev *mddev, sector_t blocks, int chunksize); 91 int (*load)(struct mddev *mddev); 92 void (*destroy)(struct mddev *mddev); 93 void (*flush)(struct mddev *mddev); 94 void (*write_all)(struct mddev *mddev); 95 void (*dirty_bits)(struct mddev *mddev, unsigned long s, 98 void (*prepare_range)(struct mddev *mddev, 102 void (*reshape_finish)(struct mddev *mddev); [all …]
|
| H A D | raid0.c | 38 static void dump_zones(struct mddev *mddev) in dump_zones() argument 43 struct r0conf *conf = mddev->private; in dump_zones() 46 mdname(mddev), in dump_zones() 66 static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) in create_strip_zones() argument 76 if (!mddev_is_dm(mddev)) in create_strip_zones() 77 blksize = queue_logical_block_size(mddev->gendisk->queue); in create_strip_zones() 82 rdev_for_each(rdev1, mddev) { in create_strip_zones() 84 mdname(mddev), in create_strip_zones() 90 sector_div(sectors, mddev->chunk_sectors); in create_strip_zones() 91 rdev1->sectors = sectors * mddev->chunk_sectors; in create_strip_zones() [all …]
|
| H A D | md-cluster.c | 28 struct mddev *mddev; /* pointing back to mddev. */ member 63 struct mddev *mddev; /* the md device which md_cluster_info belongs to */ member 159 struct mddev *mddev) in dlm_lock_sync_interruptible() argument 171 || test_bit(MD_CLOSING, &mddev->flags)); in dlm_lock_sync_interruptible() 192 static struct dlm_lock_resource *lockres_init(struct mddev *mddev, in lockres_init() argument 197 struct md_cluster_info *cinfo = mddev->cluster_info; in lockres_init() 205 res->mddev = mddev; in lockres_init() 277 static int read_resync_info(struct mddev *mddev, in read_resync_info() argument 281 struct md_cluster_info *cinfo = mddev->cluster_info; in read_resync_info() 297 struct mddev *mddev = thread->mddev; in recover_bitmaps() local [all …]
|
| H A D | md-linear.c | 30 static inline struct dev_info *which_dev(struct mddev *mddev, sector_t sector) in which_dev() argument 36 hi = mddev->raid_disks - 1; in which_dev() 37 conf = mddev->private; in which_dev() 55 static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disks) in linear_size() argument 60 conf = mddev->private; in linear_size() 68 static int linear_set_limits(struct mddev *mddev) in linear_set_limits() argument 75 lim.max_hw_sectors = mddev->chunk_sectors; in linear_set_limits() 76 lim.logical_block_size = mddev->logical_block_size; in linear_set_limits() 77 lim.max_write_zeroes_sectors = mddev->chunk_sectors; in linear_set_limits() 78 lim.max_hw_wzeroes_unmap_sectors = mddev->chunk_sectors; in linear_set_limits() [all …]
|
| H A D | md-llbitmap.c | 278 struct mddev *mddev; member 427 static void __llbitmap_flush(struct mddev *mddev); 428 static void llbitmap_flush(struct mddev *mddev); 431 static void llbitmap_calculate_chunks(struct mddev *mddev, sector_t blocks, in llbitmap_calculate_chunks() argument 436 while (*chunks > mddev->bitmap_info.space << SECTOR_SHIFT) { in llbitmap_calculate_chunks() 445 struct mddev *mddev = llbitmap->mddev; in llbitmap_personality_sync_size() local 447 if (READ_ONCE(mddev->reshape_position) == MaxSector || in llbitmap_personality_sync_size() 448 !mddev->private || !mddev->pers || in llbitmap_personality_sync_size() 449 !mddev->pers->bitmap_sync_size) in llbitmap_personality_sync_size() 451 return mddev->pers->bitmap_sync_size(mddev, previous); in llbitmap_personality_sync_size() [all …]
|
| H A D | md-bitmap.c | 167 struct mddev *mddev; /* the md device that the bitmap is for */ member 226 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname() 348 static int read_sb_page(struct mddev *mddev, loff_t offset, in read_sb_page() argument 352 sector_t sector = mddev->bitmap_info.offset + offset + in read_sb_page() 356 rdev_for_each(rdev, mddev) { in read_sb_page() 370 static struct md_rdev *next_active_rdev(struct md_rdev *rdev, struct mddev *mddev) in next_active_rdev() argument 388 rdev = list_entry(&mddev->disks, struct md_rdev, same_set); in next_active_rdev() 391 rdev_dec_pending(rdev, mddev); in next_active_rdev() 393 list_for_each_entry_continue_rcu(rdev, &mddev->disks, same_set) { in next_active_rdev() 432 struct mddev *mddev = bitmap->mddev; in __write_sb_page() local [all …]
|
| H A D | raid10.c | 74 static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, 76 static void reshape_request_write(struct mddev *mddev, struct r10bio *r10_bio); 154 if (test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery) || in r10buf_pool_alloc() 155 test_bit(MD_RECOVERY_RESHAPE, &conf->mddev->recovery)) in r10buf_pool_alloc() 201 &conf->mddev->recovery)) { in r10buf_pool_alloc() 287 struct r10conf *conf = r10_bio->mddev->private; in free_r10bio() 295 struct r10conf *conf = r10_bio->mddev->private; in put_buf() 311 struct mddev *mddev = r10_bio->mddev; in reschedule_retry() local 312 struct r10conf *conf = mddev->private; in reschedule_retry() 322 md_wakeup_thread(mddev->thread); in reschedule_retry() [all …]
|
| H A D | raid1.c | 49 static void raid1_free(struct mddev *mddev, void *priv); 92 struct mddev *mddev = rdev->mddev; in wait_for_serialization() local 95 if (WARN_ON(!mddev->serial_info_pool)) in wait_for_serialization() 97 si = mempool_alloc(mddev->serial_info_pool, GFP_NOIO); in wait_for_serialization() 112 struct mddev *mddev = rdev->mddev; in remove_serial() local 137 mempool_free(si, mddev->serial_info_pool); in remove_serial() 201 if (test_bit(MD_RECOVERY_REQUESTED, &conf->mddev->recovery)) in r1buf_pool_alloc() 276 struct r1conf *conf = r1_bio->mddev->private; in free_r1bio() 284 struct r1conf *conf = r1_bio->mddev->private; in put_buf() 291 rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev); in put_buf() [all …]
|
| H A D | raid5.c | 76 static void raid5_quiesce(struct mddev *mddev, int quiesce); 203 md_wakeup_thread(conf->mddev->thread); in raid5_wakeup_stripe_thread() 276 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 282 md_wakeup_thread(conf->mddev->thread); in do_release_stripe() 364 md_wakeup_thread(conf->mddev->thread); in release_inactive_stripe_list() 410 if (unlikely(!conf->mddev->thread) || in raid5_release_stripe() 415 md_wakeup_thread(conf->mddev->thread); in raid5_release_stripe() 751 int degraded = conf->mddev->degraded; in has_failed() 753 if (test_bit(MD_BROKEN, &conf->mddev->flags)) in has_failed() 756 if (conf->mddev->reshape_position != MaxSector) in has_failed() [all …]
|
| H A D | raid1-10.c | 128 static inline bool raid1_add_bio_to_plug(struct mddev *mddev, struct bio *bio, in raid1_add_bio_to_plug() argument 138 if (!md_bitmap_enabled(mddev, true)) { in raid1_add_bio_to_plug() 143 cb = blk_check_plugged(unplug, mddev, sizeof(*plug)); in raid1_add_bio_to_plug() 164 static inline void raid1_prepare_flush_writes(struct mddev *mddev) in raid1_prepare_flush_writes() argument 166 mddev->bitmap_ops->unplug(mddev, current->bio_list == NULL); in raid1_prepare_flush_writes() 174 static inline void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev) in check_decay_read_errors() argument 204 static inline bool exceed_read_errors(struct mddev *mddev, struct md_rdev *rdev) in exceed_read_errors() argument 206 int max_read_errors = atomic_read(&mddev->max_corr_read_errors); in exceed_read_errors() 209 check_decay_read_errors(mddev, rdev); in exceed_read_errors() 213 mdname(mddev), rdev->bdev, read_errors, max_read_errors); in exceed_read_errors() [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 | raid10.h | 24 struct mddev *mddev; member 121 struct mddev *mddev; member
|
| H A D | raid5.h | 574 struct mddev *mddev; member 805 int raid5_set_cache_size(struct mddev *mddev, int size); 823 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()
|