raid5-log.h (498495dba268b20e8eadd7fe93c140c68b6cc9d2) | raid5-log.h (1532d9e87e8b2377f12929f9e40724d5fbe6ecc5) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _RAID5_LOG_H 3#define _RAID5_LOG_H 4 5extern int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev); 6extern void r5l_exit_log(struct r5conf *conf); 7extern int r5l_write_stripe(struct r5l_log *log, struct stripe_head *head_sh); 8extern void r5l_write_stripe_run(struct r5l_log *log); --- 18 unchanged lines hidden (view full) --- 27extern void r5c_make_stripe_write_out(struct stripe_head *sh); 28extern void r5c_flush_cache(struct r5conf *conf, int num); 29extern void r5c_check_stripe_cache_usage(struct r5conf *conf); 30extern void r5c_check_cached_full_stripe(struct r5conf *conf); 31extern struct md_sysfs_entry r5c_journal_mode; 32extern void r5c_update_on_rdev_error(struct mddev *mddev, 33 struct md_rdev *rdev); 34extern bool r5c_big_stripe_cached(struct r5conf *conf, sector_t sect); | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _RAID5_LOG_H 3#define _RAID5_LOG_H 4 5extern int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev); 6extern void r5l_exit_log(struct r5conf *conf); 7extern int r5l_write_stripe(struct r5l_log *log, struct stripe_head *head_sh); 8extern void r5l_write_stripe_run(struct r5l_log *log); --- 18 unchanged lines hidden (view full) --- 27extern void r5c_make_stripe_write_out(struct stripe_head *sh); 28extern void r5c_flush_cache(struct r5conf *conf, int num); 29extern void r5c_check_stripe_cache_usage(struct r5conf *conf); 30extern void r5c_check_cached_full_stripe(struct r5conf *conf); 31extern struct md_sysfs_entry r5c_journal_mode; 32extern void r5c_update_on_rdev_error(struct mddev *mddev, 33 struct md_rdev *rdev); 34extern bool r5c_big_stripe_cached(struct r5conf *conf, sector_t sect); |
35extern int r5l_start(struct r5l_log *log); |
|
35 36extern struct dma_async_tx_descriptor * 37ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, 38 struct dma_async_tx_descriptor *tx); 39extern int ppl_init_log(struct r5conf *conf); 40extern void ppl_exit_log(struct r5conf *conf); 41extern int ppl_write_stripe(struct r5conf *conf, struct stripe_head *sh); 42extern void ppl_write_stripe_run(struct r5conf *conf); 43extern void ppl_stripe_write_finished(struct stripe_head *sh); 44extern int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add); | 36 37extern struct dma_async_tx_descriptor * 38ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, 39 struct dma_async_tx_descriptor *tx); 40extern int ppl_init_log(struct r5conf *conf); 41extern void ppl_exit_log(struct r5conf *conf); 42extern int ppl_write_stripe(struct r5conf *conf, struct stripe_head *sh); 43extern void ppl_write_stripe_run(struct r5conf *conf); 44extern void ppl_stripe_write_finished(struct stripe_head *sh); 45extern int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add); |
46extern void ppl_quiesce(struct r5conf *conf, int quiesce); |
|
45 46static inline bool raid5_has_ppl(struct r5conf *conf) 47{ 48 return test_bit(MD_HAS_PPL, &conf->mddev->flags); 49} 50 51static inline int log_stripe(struct stripe_head *sh, struct stripe_head_state *s) 52{ --- 29 unchanged lines hidden (view full) --- 82static inline void log_write_stripe_run(struct r5conf *conf) 83{ 84 if (conf->log) 85 r5l_write_stripe_run(conf->log); 86 else if (raid5_has_ppl(conf)) 87 ppl_write_stripe_run(conf); 88} 89 | 47 48static inline bool raid5_has_ppl(struct r5conf *conf) 49{ 50 return test_bit(MD_HAS_PPL, &conf->mddev->flags); 51} 52 53static inline int log_stripe(struct stripe_head *sh, struct stripe_head_state *s) 54{ --- 29 unchanged lines hidden (view full) --- 84static inline void log_write_stripe_run(struct r5conf *conf) 85{ 86 if (conf->log) 87 r5l_write_stripe_run(conf->log); 88 else if (raid5_has_ppl(conf)) 89 ppl_write_stripe_run(conf); 90} 91 |
92static inline void log_flush_stripe_to_raid(struct r5conf *conf) 93{ 94 if (conf->log) 95 r5l_flush_stripe_to_raid(conf->log); 96 else if (raid5_has_ppl(conf)) 97 ppl_write_stripe_run(conf); 98} 99 100static inline int log_handle_flush_request(struct r5conf *conf, struct bio *bio) 101{ 102 int ret = -ENODEV; 103 104 if (conf->log) 105 ret = r5l_handle_flush_request(conf->log, bio); 106 else if (raid5_has_ppl(conf)) 107 ret = 0; 108 109 return ret; 110} 111 112static inline void log_quiesce(struct r5conf *conf, int quiesce) 113{ 114 if (conf->log) 115 r5l_quiesce(conf->log, quiesce); 116 else if (raid5_has_ppl(conf)) 117 ppl_quiesce(conf, quiesce); 118} 119 |
|
90static inline void log_exit(struct r5conf *conf) 91{ 92 if (conf->log) 93 r5l_exit_log(conf); 94 else if (raid5_has_ppl(conf)) 95 ppl_exit_log(conf); 96} 97 --- 20 unchanged lines hidden --- | 120static inline void log_exit(struct r5conf *conf) 121{ 122 if (conf->log) 123 r5l_exit_log(conf); 124 else if (raid5_has_ppl(conf)) 125 ppl_exit_log(conf); 126} 127 --- 20 unchanged lines hidden --- |