diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-04-04 18:31:27 (GMT) |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-06 19:54:33 (GMT) |
commit | cc95bef635a649d595cf8d1cd4fcff5b6bf13023 (patch) | |
tree | dbe8e6b5953648dbef4ce26e45f522ed73103238 /fs/btrfs/extent_map.h | |
parent | 98ad69cfd2ca8e27250af839bacda1639a7dc3a4 (diff) | |
download | linux-fsl-qoriq-cc95bef635a649d595cf8d1cd4fcff5b6bf13023.tar.xz |
Btrfs: log ram bytes properly
When logging changed extents I was logging ram_bytes as the current length,
which isn't correct, it's supposed to be the ram bytes of the original extent.
This is for compression where even if we split the extent we need to know the
ram bytes so when we uncompress the extent we know how big it will be. This was
still working out right with compression for some reason but I think we were
getting lucky. It was definitely off for prealloc which is why I noticed it,
btrfsck was complaining about it. With this patch btrfsck no longer complains
after a log replay. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/extent_map.h')
-rw-r--r-- | fs/btrfs/extent_map.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h index c6598c8..b18314b 100644 --- a/fs/btrfs/extent_map.h +++ b/fs/btrfs/extent_map.h @@ -26,6 +26,7 @@ struct extent_map { u64 mod_len; u64 orig_start; u64 orig_block_len; + u64 ram_bytes; u64 block_start; u64 block_len; u64 generation; |