Lines Matching refs:conf
5 int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev);
6 void r5l_exit_log(struct r5conf *conf);
13 bool r5l_log_disk_error(struct r5conf *conf);
15 int r5c_try_caching_write(struct r5conf *conf, struct stripe_head *sh,
17 void r5c_finish_stripe_write_out(struct r5conf *conf, struct stripe_head *sh,
22 void r5c_handle_cached_data_endio(struct r5conf *conf,
26 void r5c_flush_cache(struct r5conf *conf, int num);
27 void r5c_check_stripe_cache_usage(struct r5conf *conf);
28 void r5c_check_cached_full_stripe(struct r5conf *conf);
31 bool r5c_big_stripe_cached(struct r5conf *conf, sector_t sect);
37 int ppl_init_log(struct r5conf *conf);
38 void ppl_exit_log(struct r5conf *conf);
39 int ppl_write_stripe(struct r5conf *conf, struct stripe_head *sh);
40 void ppl_write_stripe_run(struct r5conf *conf);
42 int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add);
43 void ppl_quiesce(struct r5conf *conf, int quiesce);
47 static inline bool raid5_has_log(struct r5conf *conf) in raid5_has_log() argument
49 return test_bit(MD_HAS_JOURNAL, &conf->mddev->flags); in raid5_has_log()
52 static inline bool raid5_has_ppl(struct r5conf *conf) in raid5_has_ppl() argument
54 return test_bit(MD_HAS_PPL, &conf->mddev->flags); in raid5_has_ppl()
59 struct r5conf *conf = sh->raid_conf; in log_stripe() local
61 if (conf->log) { in log_stripe()
66 return r5l_write_stripe(conf->log, sh); in log_stripe()
69 return r5c_cache_data(conf->log, sh); in log_stripe()
71 } else if (raid5_has_ppl(conf)) { in log_stripe()
72 return ppl_write_stripe(conf, sh); in log_stripe()
80 struct r5conf *conf = sh->raid_conf; in log_stripe_write_finished() local
82 if (conf->log) in log_stripe_write_finished()
84 else if (raid5_has_ppl(conf)) in log_stripe_write_finished()
88 static inline void log_write_stripe_run(struct r5conf *conf) in log_write_stripe_run() argument
90 if (conf->log) in log_write_stripe_run()
91 r5l_write_stripe_run(conf->log); in log_write_stripe_run()
92 else if (raid5_has_ppl(conf)) in log_write_stripe_run()
93 ppl_write_stripe_run(conf); in log_write_stripe_run()
96 static inline void log_flush_stripe_to_raid(struct r5conf *conf) in log_flush_stripe_to_raid() argument
98 if (conf->log) in log_flush_stripe_to_raid()
99 r5l_flush_stripe_to_raid(conf->log); in log_flush_stripe_to_raid()
100 else if (raid5_has_ppl(conf)) in log_flush_stripe_to_raid()
101 ppl_write_stripe_run(conf); in log_flush_stripe_to_raid()
104 static inline int log_handle_flush_request(struct r5conf *conf, struct bio *bio) in log_handle_flush_request() argument
108 if (conf->log) in log_handle_flush_request()
109 ret = r5l_handle_flush_request(conf->log, bio); in log_handle_flush_request()
110 else if (raid5_has_ppl(conf)) in log_handle_flush_request()
116 static inline void log_quiesce(struct r5conf *conf, int quiesce) in log_quiesce() argument
118 if (conf->log) in log_quiesce()
119 r5l_quiesce(conf->log, quiesce); in log_quiesce()
120 else if (raid5_has_ppl(conf)) in log_quiesce()
121 ppl_quiesce(conf, quiesce); in log_quiesce()
124 static inline void log_exit(struct r5conf *conf) in log_exit() argument
126 if (conf->log) in log_exit()
127 r5l_exit_log(conf); in log_exit()
128 else if (raid5_has_ppl(conf)) in log_exit()
129 ppl_exit_log(conf); in log_exit()
132 static inline int log_init(struct r5conf *conf, struct md_rdev *journal_dev, in log_init() argument
136 return r5l_init_log(conf, journal_dev); in log_init()
138 return ppl_init_log(conf); in log_init()
143 static inline int log_modify(struct r5conf *conf, struct md_rdev *rdev, bool add) in log_modify() argument
145 if (raid5_has_ppl(conf)) in log_modify()
146 return ppl_modify_log(conf, rdev, add); in log_modify()