On 02/08/2017 12:55 AM, Shaohua Li wrote:
Currently MD is rebusing some bio fields. To remove the hack, we attach extra data to each bio. Each personablity can attach extra data to the bios, so we don't need to rebuse bio fields.
rebuse? Maybe it should be reuse, or abuse. [snip]
+static inline void *md_get_per_bio_data(struct bio *bio) +{ + return ((struct md_per_bio_data *)bio->bi_private) + 1; +} + +extern void md_bio_attach_data(struct mddev *mddev, struct bio *bio);
Why not make raid1_bio_ref_ptr and raid10_bio_ref_ptr as macro like raid5_get_bio_data? Or add inline before the two funcs since both of them are called frequently. Thanks, Guoqing -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html