Home
last modified time | relevance | path

Searched refs:mddev (Results 1 – 18 of 18) sorted by relevance

/linux-4.1.27/drivers/md/
Dmd.c79 static int remove_and_add_spares(struct mddev *mddev,
81 static void mddev_detach(struct mddev *mddev);
104 static inline int speed_min(struct mddev *mddev) in speed_min() argument
106 return mddev->sync_speed_min ? in speed_min()
107 mddev->sync_speed_min : sysctl_speed_limit_min; in speed_min()
110 static inline int speed_max(struct mddev *mddev) in speed_max() argument
112 return mddev->sync_speed_max ? in speed_max()
113 mddev->sync_speed_max : sysctl_speed_limit_max; in speed_max()
165 struct mddev *mddev) in bio_alloc_mddev() argument
169 if (!mddev || !mddev->bio_set) in bio_alloc_mddev()
[all …]
Dmd.h44 struct mddev *mddev; /* RAID array if running */ member
212 struct mddev { struct
459 void (*sync_super)(struct mddev *mddev, struct md_rdev *rdev); argument
463 static inline int __must_check mddev_lock(struct mddev *mddev) in mddev_lock() argument
465 return mutex_lock_interruptible(&mddev->reconfig_mutex); in mddev_lock()
471 static inline void mddev_lock_nointr(struct mddev *mddev) in mddev_lock_nointr() argument
473 mutex_lock(&mddev->reconfig_mutex); in mddev_lock_nointr()
476 static inline int mddev_is_locked(struct mddev *mddev) in mddev_is_locked() argument
478 return mutex_is_locked(&mddev->reconfig_mutex); in mddev_is_locked()
481 static inline int mddev_trylock(struct mddev *mddev) in mddev_trylock() argument
[all …]
Draid0.c28 static int raid0_congested(struct mddev *mddev, int bits) in raid0_congested() argument
30 struct r0conf *conf = mddev->private; in raid0_congested()
46 static void dump_zones(struct mddev *mddev) in dump_zones() argument
52 struct r0conf *conf = mddev->private; in dump_zones()
55 mdname(mddev), in dump_zones()
76 static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) in create_strip_zones() argument
90 rdev_for_each(rdev1, mddev) { in create_strip_zones()
92 mdname(mddev), in create_strip_zones()
98 sector_div(sectors, mddev->chunk_sectors); in create_strip_zones()
99 rdev1->sectors = sectors * mddev->chunk_sectors; in create_strip_zones()
[all …]
Dmd-cluster.h8 struct mddev;
12 int (*join)(struct mddev *mddev, int nodes);
13 int (*leave)(struct mddev *mddev);
14 int (*slot_number)(struct mddev *mddev);
15 void (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi);
16 int (*resync_start)(struct mddev *mddev, sector_t lo, sector_t hi);
17 void (*resync_finish)(struct mddev *mddev);
18 int (*metadata_update_start)(struct mddev *mddev);
19 int (*metadata_update_finish)(struct mddev *mddev);
20 int (*metadata_update_cancel)(struct mddev *mddev);
[all …]
Dlinear.c30 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()
63 static int linear_mergeable_bvec(struct mddev *mddev, in linear_mergeable_bvec() argument
73 dev0 = which_dev(mddev, sector); in linear_mergeable_bvec()
97 static int linear_congested(struct mddev *mddev, int bits) in linear_congested() argument
102 conf = mddev->private; in linear_congested()
104 for (i = 0; i < mddev->raid_disks && !ret ; i++) { in linear_congested()
112 static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disks) in linear_size() argument
117 conf = mddev->private; in linear_size()
[all …]
Dmultipath.c61 struct mddev *mddev = mp_bh->mddev; in multipath_reschedule_retry() local
62 struct mpconf *conf = mddev->private; in multipath_reschedule_retry()
67 md_wakeup_thread(mddev->thread); in multipath_reschedule_retry()
78 struct mpconf *conf = mp_bh->mddev->private; in multipath_end_bh_io()
88 struct mpconf *conf = mp_bh->mddev->private; in multipath_end_request()
98 md_error (mp_bh->mddev, rdev); in multipath_end_request()
105 rdev_dec_pending(rdev, conf->mddev); in multipath_end_request()
108 static void multipath_make_request(struct mddev *mddev, struct bio * bio) in multipath_make_request() argument
110 struct mpconf *conf = mddev->private; in multipath_make_request()
115 md_flush_request(mddev, bio); in multipath_make_request()
[all …]
Dmd-cluster.c30 struct mddev *mddev; /* pointing back to mddev. */ member
116 static struct dlm_lock_resource *lockres_init(struct mddev *mddev, in lockres_init() argument
121 struct md_cluster_info *cinfo = mddev->cluster_info; in lockres_init()
127 res->mddev = mddev; in lockres_init()
191 static void add_resync_info(struct mddev *mddev, struct dlm_lock_resource *lockres, in add_resync_info() argument
201 static struct suspend_info *read_resync_info(struct mddev *mddev, struct dlm_lock_resource *lockres) in read_resync_info() argument
224 struct mddev *mddev = thread->mddev; in recover_bitmaps() local
225 struct md_cluster_info *cinfo = mddev->cluster_info; in recover_bitmaps()
245 bm_lockres = lockres_init(mddev, str, NULL, 1); in recover_bitmaps()
257 ret = bitmap_copy_from_slot(mddev, slot, &lo, &hi, true); in recover_bitmaps()
[all …]
Dbitmap.c35 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname()
145 static int read_sb_page(struct mddev *mddev, loff_t offset, in read_sb_page() argument
154 rdev_for_each(rdev, mddev) { in read_sb_page()
171 static struct md_rdev *next_active_rdev(struct md_rdev *rdev, struct mddev *mddev) in next_active_rdev() argument
189 rdev = list_entry(&mddev->disks, struct md_rdev, same_set); in next_active_rdev()
192 rdev_dec_pending(rdev, mddev); in next_active_rdev()
194 list_for_each_entry_continue_rcu(rdev, &mddev->disks, same_set) { in next_active_rdev()
211 struct mddev *mddev = bitmap->mddev; in write_sb_page() local
215 if (mddev_is_clustered(bitmap->mddev)) in write_sb_page()
218 while ((rdev = next_active_rdev(rdev, mddev)) != NULL) { in write_sb_page()
[all …]
Draid1.c122 if (test_bit(MD_RECOVERY_REQUESTED, &pi->mddev->recovery)) in r1buf_pool_alloc()
134 if (!test_bit(MD_RECOVERY_REQUESTED, &pi->mddev->recovery)) { in r1buf_pool_alloc()
193 struct r1conf *conf = r1_bio->mddev->private; in free_r1bio()
201 struct r1conf *conf = r1_bio->mddev->private; in put_buf()
207 rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev); in put_buf()
218 struct mddev *mddev = r1_bio->mddev; in reschedule_retry() local
219 struct r1conf *conf = mddev->private; in reschedule_retry()
227 md_wakeup_thread(mddev->thread); in reschedule_retry()
239 struct r1conf *conf = r1_bio->mddev->private; in call_bio_endio()
290 struct r1conf *conf = r1_bio->mddev->private; in update_head_pos()
[all …]
Draid10.c101 static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr,
103 static void reshape_request_write(struct mddev *mddev, struct r10bio *r10_bio);
150 if (test_bit(MD_RECOVERY_SYNC, &conf->mddev->recovery) || in r10buf_pool_alloc()
151 test_bit(MD_RECOVERY_RESHAPE, &conf->mddev->recovery)) in r10buf_pool_alloc()
180 &conf->mddev->recovery)) { in r10buf_pool_alloc()
258 struct r10conf *conf = r10_bio->mddev->private; in free_r10bio()
266 struct r10conf *conf = r10_bio->mddev->private; in put_buf()
276 struct mddev *mddev = r10_bio->mddev; in reschedule_retry() local
277 struct r10conf *conf = mddev->private; in reschedule_retry()
287 md_wakeup_thread(mddev->thread); in reschedule_retry()
[all …]
Draid5.c271 md_wakeup_thread(conf->mddev->thread); in raid5_wakeup_stripe_thread()
315 md_wakeup_thread(conf->mddev->thread); in do_release_stripe()
321 md_wakeup_thread(conf->mddev->thread); in do_release_stripe()
378 md_wakeup_thread(conf->mddev->thread); in release_inactive_stripe_list()
426 if (unlikely(!conf->mddev->thread) || in release_stripe()
431 md_wakeup_thread(conf->mddev->thread); in release_stripe()
649 if (conf->mddev->reshape_position == MaxSector) in has_failed()
650 return conf->mddev->degraded > conf->max_degraded; in has_failed()
839 md_wakeup_thread(conf->mddev->thread); in stripe_add_to_batch_list()
965 if (!conf->mddev->external && in ops_run_io()
[all …]
Dfaulty.c173 static void make_request(struct mddev *mddev, struct bio *bio) in make_request() argument
175 struct faulty_conf *conf = mddev->private; in make_request()
217 struct bio *b = bio_clone_mddev(bio, GFP_NOIO, mddev); in make_request()
229 static void status(struct seq_file *seq, struct mddev *mddev) in status() argument
231 struct faulty_conf *conf = mddev->private; in status()
262 static int reshape(struct mddev *mddev) in reshape() argument
264 int mode = mddev->new_layout & ModeMask; in reshape()
265 int count = mddev->new_layout >> ModeShift; in reshape()
266 struct faulty_conf *conf = mddev->private; in reshape()
268 if (mddev->new_layout < 0) in reshape()
[all …]
Ddm-raid.c68 struct mddev md;
239 rs->dev[i].rdev.mddev = &rs->md; in dev_parms()
798 md_error(rdev->mddev, rdev); in read_disk_sb()
807 static void super_sync(struct mddev *mddev, struct md_rdev *rdev) in super_sync() argument
812 struct raid_set *rs = container_of(mddev, struct raid_set, md); in super_sync()
817 for (i = 0; i < mddev->raid_disks; i++) in super_sync()
827 sb->num_devices = cpu_to_le32(mddev->raid_disks); in super_sync()
830 sb->events = cpu_to_le64(mddev->events); in super_sync()
834 sb->array_resync_offset = cpu_to_le64(mddev->recovery_cp); in super_sync()
836 sb->level = cpu_to_le32(mddev->level); in super_sync()
[all …]
Dbitmap.h192 struct mddev *mddev; /* the md device that the bitmap is for */ member
236 struct bitmap *bitmap_create(struct mddev *mddev, int slot);
237 int bitmap_load(struct mddev *mddev);
238 void bitmap_flush(struct mddev *mddev);
239 void bitmap_destroy(struct mddev *mddev);
261 void bitmap_daemon_work(struct mddev *mddev);
265 int bitmap_copy_from_slot(struct mddev *mddev, int slot,
Draid1.h27 struct mddev *mddev; member
32 struct mddev *mddev; member
129 struct mddev *mddev; member
Dmultipath.h9 struct mddev *mddev; member
25 struct mddev *mddev; member
Draid10.h15 struct mddev *mddev; member
99 struct mddev *mddev; member
Draid5.h433 struct mddev *mddev; member
609 extern int raid5_set_cache_size(struct mddev *mddev, int size);