Btrfs: fix extent logging with O_DIRECT into prealloc
authorJosef Bacik <jbacik@fusionio.com>
Wed, 24 Apr 2013 20:32:55 +0000 (16:32 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2013 14:18:37 +0000 (07:18 -0700)
commitd2775711193f1bad066bc5349969ec0bcc9dccb1
tree184f51cbe9928820531deb17962ba650f08eb46e
parenta2d8e3c7a2341da3fd6e65f87ef7712e5fa2a020
Btrfs: fix extent logging with O_DIRECT into prealloc

commit eb384b55ae9c2055ea00c5cc87971e182d47aefa upstream.

This is the same as the fix from commit

Btrfs: fix bad extent logging

but for O_DIRECT.  I missed this when I fixed the problem originally, we were
still using the em for the orig_start and orig_block_len, which would be the
merged extent.  We need to use the actual extent from the on disk file extent
item, which we have to lookup to make sure it's ok to nocow anyway so just pass
in some pointers to hold this info.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/inode.c