[linux-lvm] resend patch - bcache may mistakenly write data to another disk when writes error
teigland at redhat.com
Wed Nov 13 15:41:26 UTC 2019
On Wed, Nov 13, 2019 at 02:23:42AM +0000, Heming Zhao wrote:
> label_write // @ lib/label/label.c
> +-> dev_write_bytes //
> | +-> if (!bcache_flush()) //when failed, call below invalidate
> | label_scan_invalidate // will set fd=-1 in _scan_dev_close()
> +-> dev_unset_last_byte // with fd: -1
> +-> bcache_unset_last_byte
> +-> _last_byte_fd != fd(-1), the _last_byte_xx never clean.
> So all bcache_unset_last_byte which after dev_write_bytes should be modified.
> For detail code fix, please check my V2 patch which I sent on Oct 28th.
Got it, thanks for your work on that, please check I got all the necessary
lines from your patch.
> Would you have any plan/schedule to backport bcache bug fixes to stable-2.02 branch?
I'll try to apply them all today.
More information about the linux-lvm