Closed arighi closed 1 year ago
@arighi
Thanks for the fix.
But the if-else branches nesting is very confusing for me. I know you tried to avoid duplicating some code such as bio_is_barrier
though.
I prefer writing as in this form.
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)
// new defines
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
// the same
#else
// the same
#endif
Sure, I can change to this format, it's definitely more readable.
With commit 581075e4f647 ("dm/core: Reduce the size of struct dm_io_request") bi_op and bi_op_flags in struct dm_io_request have been merged together into the same attribute bi_opf, make sure to support this change in recent kernels.
Signed-off-by: Andrea Righi andrea.righi@canonical.com