veeam / blksnap

Nonpersistent block device snapshot with block-level change-tracking capabilities.
GNU General Public License v2.0
84 stars 22 forks source link

Only set REQ_FUA for writes #59

Closed rosslagerwall closed 1 year ago

rosslagerwall commented 1 year ago

xen-blkfront is buggy and unexpectedly handles a read with the REQ_FUA bit set as a write which causes data loss. Since the REQ_FUA bit doesn't make sense with read operations anyway, workaround the issue by only setting it for writes.

rosslagerwall commented 1 year ago

This only targets the VAL-6.0 branch. Other branches in the repo seem to have made REQ_FUA conditional on writes as a side-effect of some other changes so this commit isn't needed for those branches.

SergeiShtepa commented 1 year ago

Thank you, @rosslagerwall, for your help in discovering the cause of a very strange bug that appeared on Xen virtual machines.

Fantu commented 1 year ago

data loss is a serious issue, thanks @rosslagerwall for the fix I found a kb probably related: https://www.veeam.com/kb4428 @SergeiShtepa If the issue of the kb is the same I think can be good update it for users that use veeam 6.0 with blksnap and link to the patch that fix it (waiting the release of new bugfix version that include it)

SergeiShtepa commented 1 year ago

Yes. Of course. In progress. It is necessary for QA to make regression testing, support updated KB. It takes time.

rosslagerwall commented 1 year ago

FYI I have also posted https://lists.xenproject.org/archives/html/xen-devel/2023-04/msg01555.html to resolve this issue in xen-blkfront but it will be a long time before that gets into all the relevant distros.