]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: log ram bytes properly
authorJosef Bacik <jbacik@fusionio.com>
Thu, 4 Apr 2013 18:31:27 +0000 (14:31 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:33 +0000 (15:54 -0400)
commitfa74b44f60ba24b30800d42cc3bbf714c16de133
treedbe8e6b5953648dbef4ce26e45f522ed73103238
parent7cf738a88246750e5d706b0c06d4a7817d62c9f3
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>
fs/btrfs/extent_map.h
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/tree-log.c