Lines Matching refs:conf
5 extern int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev);
6 extern void r5l_exit_log(struct r5conf *conf);
13 extern bool r5l_log_disk_error(struct r5conf *conf);
16 r5c_try_caching_write(struct r5conf *conf, struct stripe_head *sh,
19 r5c_finish_stripe_write_out(struct r5conf *conf, struct stripe_head *sh,
24 extern void r5c_handle_cached_data_endio(struct r5conf *conf,
28 extern void r5c_flush_cache(struct r5conf *conf, int num);
29 extern void r5c_check_stripe_cache_usage(struct r5conf *conf);
30 extern void r5c_check_cached_full_stripe(struct r5conf *conf);
34 extern bool r5c_big_stripe_cached(struct r5conf *conf, sector_t sect);
40 extern int ppl_init_log(struct r5conf *conf);
41 extern void ppl_exit_log(struct r5conf *conf);
42 extern int ppl_write_stripe(struct r5conf *conf, struct stripe_head *sh);
43 extern void ppl_write_stripe_run(struct r5conf *conf);
45 extern int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add);
46 extern void ppl_quiesce(struct r5conf *conf, int quiesce);
50 static inline bool raid5_has_log(struct r5conf *conf)
52 return test_bit(MD_HAS_JOURNAL, &conf->mddev->flags);
55 static inline bool raid5_has_ppl(struct r5conf *conf)
57 return test_bit(MD_HAS_PPL, &conf->mddev->flags);
62 struct r5conf *conf = sh->raid_conf;
64 if (conf->log) {
69 return r5l_write_stripe(conf->log, sh);
72 return r5c_cache_data(conf->log, sh);
74 } else if (raid5_has_ppl(conf)) {
75 return ppl_write_stripe(conf, sh);
83 struct r5conf *conf = sh->raid_conf;
85 if (conf->log)
87 else if (raid5_has_ppl(conf))
91 static inline void log_write_stripe_run(struct r5conf *conf)
93 if (conf->log)
94 r5l_write_stripe_run(conf->log);
95 else if (raid5_has_ppl(conf))
96 ppl_write_stripe_run(conf);
99 static inline void log_flush_stripe_to_raid(struct r5conf *conf)
101 if (conf->log)
102 r5l_flush_stripe_to_raid(conf->log);
103 else if (raid5_has_ppl(conf))
104 ppl_write_stripe_run(conf);
107 static inline int log_handle_flush_request(struct r5conf *conf, struct bio *bio)
111 if (conf->log)
112 ret = r5l_handle_flush_request(conf->log, bio);
113 else if (raid5_has_ppl(conf))
114 ret = ppl_handle_flush_request(conf->log, bio);
119 static inline void log_quiesce(struct r5conf *conf, int quiesce)
121 if (conf->log)
122 r5l_quiesce(conf->log, quiesce);
123 else if (raid5_has_ppl(conf))
124 ppl_quiesce(conf, quiesce);
127 static inline void log_exit(struct r5conf *conf)
129 if (conf->log)
130 r5l_exit_log(conf);
131 else if (raid5_has_ppl(conf))
132 ppl_exit_log(conf);
135 static inline int log_init(struct r5conf *conf, struct md_rdev *journal_dev,
139 return r5l_init_log(conf, journal_dev);
141 return ppl_init_log(conf);
146 static inline int log_modify(struct r5conf *conf, struct md_rdev *rdev, bool add)
148 if (raid5_has_ppl(conf))
149 return ppl_modify_log(conf, rdev, add);