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

Call original IO if any error occurs in snap_trace_bio #284

Closed Finix1979 closed 1 year ago

Finix1979 commented 1 year ago

If any error occurs in snap_trace_bio, we should still issue original write io along with setting the snap device to failure mode.

Besides that, call tp_get(tp) only when the clone finishes successfully, otherwise, tp can not get a chance to be destroyed.

To simplify the error handling, use bio_list to gather all new_bio and submit them in one loop.

Signed-off-by: Finix yancw@info2soft.com

dakotarwilliams commented 1 year ago

Looks good, thanks!