datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
561 stars 120 forks source link

Kernel 5.11 support #288

Closed dakotarwilliams closed 1 year ago

dakotarwilliams commented 1 year ago

Built on work from #280, this implementation uses ftrace rather than gendisk swapping to intercept disk I/O. This approach still avoids using unexported functions and adding more symbol lookups at compile-time.

The ftrace approach also avoids the issue we've seen with #276, since there's no function pointer swapping going on. This MR still includes the fix for earlier kernel versions.

This approach could be extended to mount/unmount events thereby re-enabling unverified and dormant snapshot states, however further investigation is required.

Obsoletes #280 Fixes #276

ibambotdatto commented 1 year ago

Can't hit the approve button anymore, but aside from the above nits, everything LGTM as far as I could tell.