+2
−1
Loading
If we're moving an extent that was partially overwritten, bch2_write_rechecksum() will trim it to the currenty live range. If we then also want to compress it, it'll be decrypted - but the nonce has been advanced for the overwritten start of the extent that we dropped, and we were using the nonce we calculated before rechecksum(). Reported-by:Gabriel de Perthuis <g2p.code@gmail.com> Fixes: 127d90d2 ("bcachefs: bch2_write_prep_encoded_data() now returns errcode") Signed-off-by:
Kent Overstreet <kent.overstreet@linux.dev>