Hello, We are researchers from Columbia University, New York. As part of our current research we have found some semantic discrepancies between btrfs and other popular filesystems. We have attached two cases. The first one involves an invalid O_DIRECT write() that fails back to buffered write instead of failing with error EINVAL. In directory 2, we discovered that btrfs calculates write_bytes in __btrfs_buffered_write differently from that in generic_perform_writes in fs/mmap.c. This can cause inconsistent behavior between btrfs and other filesystems when program invokes the same writev/write() syscall. In each directory, you will find a Readme.md describing the issue and pointing to the code that may cause the problem. For your convenience, we also included test programs (min.cpp) and instructions in Readme to help reproduce the issues. We would appreciate very much if you could confirm the two cases at your conveniences. Thanks, Amy
Attachment:
btrfs_issues.tar.gz
Description: GNU Zip compressed data
