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 bio anyway if failed to clone IO #283

Closed Finix1979 closed 1 year ago

Finix1979 commented 1 year ago

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

Besides that, call tp_get(tp) only when clone finish successfully, otherwise tp can not get chance to destroy.

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

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