+10
−0
+2
−0
+1
−1
Loading
When checksumming the encrypted bio on writes we need to know which logical address this checksum is for. At the point where we get the encrypted bio the bi_sector is the physical location on the target disk, so we need to save the original logical offset in the btrfs_bio. Then we can use this when checksumming the bio instead of the bio->iter.bi_sector. Note: The patch was taken from v5 of fscrypt patchset (https://lore.kernel.org/linux-btrfs/cover.1706116485.git.josef@toxicpanda.com/ ) which was handled over time by various people: Omar Sandoval, Sweet Tea Dorminy, Josef Bacik. Signed-off-by:Josef Bacik <josef@toxicpanda.com> Signed-off-by:
Daniel Vacek <neelx@suse.com> Reviewed-by:
David Sterba <dsterba@suse.com> [ add note ] Signed-off-by:
David Sterba <dsterba@suse.com>