On 08/07/2018 05:13 PM, Guilhem Moulin wrote:
On Sun, 05 Aug 2018 at 10:18:41 +0200, Milan Broz wrote:
Thanks for the report, we will fix it. Can you please send us (or
create issue) report including kernel version? (Just any cryptsetup
command with --debug on the same system is ok.)
Sure, I just filed #403. Thanks!
Hi,
I've closed the bug since we don't consider it to be a bug in the test
(or cryptsetup). It's just how btrfs (and possibly some other fs) work.
So, some basic explanation I failed to deliver yesterday on the list:
When userspace pass misaligned i/o with O_DIRECT flag, btrfs silently
switches to buffered i/o instead. It happens for both offset and length
misalignment. Also, operation may be system page size misaligned or
physical sector size misaligned wrt to underlying block device. This has
some implications (i.e. write only operation become silently
read-modify-write and so on...).
Discussing it with fs kernel engineer, it's unfortunately not an easy
fix for btrfs and they're aware of it.
From our perspective this is (at least) grey zone and probably it would
be better to fail such i/o passed from userspace. Userspace would be
better notified it did something wrong, but well I guess that's a life
with modern fs:)
O.
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt