diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-02-28 13:23:38 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-28 13:33:20 -0500 |
commit | bdc20e67e82cfc4901d3a5a0d79104b0e2296d83 (patch) | |
tree | c001d454533e7d3b262a20ef4b6f2703d5f69b79 /fs | |
parent | fda2832febb1928da0625b2c5d15559b29d7e740 (diff) | |
download | talos-obmc-linux-bdc20e67e82cfc4901d3a5a0d79104b0e2296d83.tar.gz talos-obmc-linux-bdc20e67e82cfc4901d3a5a0d79104b0e2296d83.zip |
Btrfs: copy everything if we've created an inline extent
I noticed while looking into a tree logging bug that we aren't logging inline
extents properly. Since this requires copying and it shouldn't happen too often
just force us to copy everything for the inode into the tree log when we have an
inline extent. With this patch we have valid data after a crash when we write
an inline extent. Thanks,
Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 9ef7a5b1b77e..ecd9c4cdb0db 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -266,6 +266,7 @@ static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans, return 1; } + set_bit(BTRFS_INODE_NEEDS_FULL_SYNC, &BTRFS_I(inode)->runtime_flags); btrfs_delalloc_release_metadata(inode, end + 1 - start); btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0); return 0; |