diff options
author | 2012-01-12 19:10:12 -0500 | |
---|---|---|
committer | 2012-01-16 15:28:54 -0500 | |
commit | f70a9a6b94af86fca069a7552ab672c31b457786 (patch) | |
tree | 0a62930b2540e11b877a1ead4050c55638bbd874 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | Btrfs: do not use btrfs_end_transaction_throttle everywhere (diff) | |
download | wireguard-linux-f70a9a6b94af86fca069a7552ab672c31b457786.tar.xz wireguard-linux-f70a9a6b94af86fca069a7552ab672c31b457786.zip |
Btrfs: fix btrfsck error 400 when truncating a compressed
Reproduce steps:
# mkfs.btrfs /dev/sdb5
# mount /dev/sdb5 -o compress=lzo /mnt
# dd if=/dev/zero of=/mnt/tmpfile bs=128K count=1
# sync
# truncate -s 64K /mnt/tmpfile
root 5 inode 257 errors 400
This is because of the wrong if condition, which is used to check if we should
subtract the bytes of the dropped range from i_blocks/i_bytes of i-node or not.
When we truncate a compressed extent, btrfs substracts the bytes of the whole
extent, it's wrong. We should substract the real size that we truncate, no
matter it is a compressed extent or not. Fix it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions