Re: [PATCH 6/6] Btrfs: fix wrong extent mapping for DirectIO

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:14AM +0800, Wang Shilong wrote: btrfs_next_leaf() will use current leaf's last key to search and then return a bigger one. So it may still return a file extent item that is smaller than expected value and we will get an overflow here for @em-len. This is easy

[PATCH 6/6] Btrfs: fix wrong extent mapping for DirectIO

2014-07-16 Thread Wang Shilong
btrfs_next_leaf() will use current leaf's last key to search and then return a bigger one. So it may still return a file extent item that is smaller than expected value and we will get an overflow here for @em-len. This is easy to reproduce for Btrfs Direct writting, it did not cause any problem,