raid5-log.h (3418d036c81dcb604b7c7c71b209d5890a8418aa) | raid5-log.h (6358c239d88c751a9f14152a8d4ad2b69f5be48f) |
---|---|
1#ifndef _RAID5_LOG_H 2#define _RAID5_LOG_H 3 4extern int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev); 5extern void r5l_exit_log(struct r5conf *conf); 6extern int r5l_write_stripe(struct r5l_log *log, struct stripe_head *head_sh); 7extern void r5l_write_stripe_run(struct r5l_log *log); 8extern void r5l_flush_stripe_to_raid(struct r5l_log *log); --- 25 unchanged lines hidden (view full) --- 34extern struct dma_async_tx_descriptor * 35ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, 36 struct dma_async_tx_descriptor *tx); 37extern int ppl_init_log(struct r5conf *conf); 38extern void ppl_exit_log(struct r5conf *conf); 39extern int ppl_write_stripe(struct r5conf *conf, struct stripe_head *sh); 40extern void ppl_write_stripe_run(struct r5conf *conf); 41extern void ppl_stripe_write_finished(struct stripe_head *sh); | 1#ifndef _RAID5_LOG_H 2#define _RAID5_LOG_H 3 4extern int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev); 5extern void r5l_exit_log(struct r5conf *conf); 6extern int r5l_write_stripe(struct r5l_log *log, struct stripe_head *head_sh); 7extern void r5l_write_stripe_run(struct r5l_log *log); 8extern void r5l_flush_stripe_to_raid(struct r5l_log *log); --- 25 unchanged lines hidden (view full) --- 34extern struct dma_async_tx_descriptor * 35ops_run_partial_parity(struct stripe_head *sh, struct raid5_percpu *percpu, 36 struct dma_async_tx_descriptor *tx); 37extern int ppl_init_log(struct r5conf *conf); 38extern void ppl_exit_log(struct r5conf *conf); 39extern int ppl_write_stripe(struct r5conf *conf, struct stripe_head *sh); 40extern void ppl_write_stripe_run(struct r5conf *conf); 41extern void ppl_stripe_write_finished(struct stripe_head *sh); |
42extern int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add); |
|
42 43static inline bool raid5_has_ppl(struct r5conf *conf) 44{ 45 return test_bit(MD_HAS_PPL, &conf->mddev->flags); 46} 47 48static inline int log_stripe(struct stripe_head *sh, struct stripe_head_state *s) 49{ --- 47 unchanged lines hidden (view full) --- 97 if (journal_dev) 98 return r5l_init_log(conf, journal_dev); 99 else if (raid5_has_ppl(conf)) 100 return ppl_init_log(conf); 101 102 return 0; 103} 104 | 43 44static inline bool raid5_has_ppl(struct r5conf *conf) 45{ 46 return test_bit(MD_HAS_PPL, &conf->mddev->flags); 47} 48 49static inline int log_stripe(struct stripe_head *sh, struct stripe_head_state *s) 50{ --- 47 unchanged lines hidden (view full) --- 98 if (journal_dev) 99 return r5l_init_log(conf, journal_dev); 100 else if (raid5_has_ppl(conf)) 101 return ppl_init_log(conf); 102 103 return 0; 104} 105 |
106static inline int log_modify(struct r5conf *conf, struct md_rdev *rdev, bool add) 107{ 108 if (raid5_has_ppl(conf)) 109 return ppl_modify_log(conf, rdev, add); 110 111 return 0; 112} 113 |
|
105#endif | 114#endif |