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)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:07 +0000 (15:55 -0400)
commit457fcf8e84e87564265634801f7d10cfaae9f3bc
tree264ce025fdf750770e7e034345a923f2a9a9752b
parentd602d8d207c6378867f8c468713a4b555c79939a
Btrfs: fix extent logging with O_DIRECT into prealloc

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,

Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/inode.c