Btrfs: fix wrong disk space information of the files
Miao Xie authored

Btrfsck report errors after the 83th case of xfstests was run, The error
number is 400, it means the used disk space of the file is wrong.

The reason of this bug is that:
The file truncation may fail when the space of the file system is not enough,
and leave some file extents, whose offset are beyond the end of the files.
When we want to expand those files, we will drop those file extents, and
put in dummy file extents, and then we should update the i-node. But btrfs
forgets to do it.

This patch adds the forgotten i-node update.
Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
3642320e
Name Last commit Last update
..
Kconfig btrfs: Add lzo compression support
Makefile Merge git://git.jan-o-sch.net/btrfs-unstable into integration
acl.c Btrfs: fix return value of btrfs_get_acl()
async-thread.c Btrfs: don't walk around with task->state != TASK_RUNNING
async-thread.h Btrfs: fix deadlock on async thread startup
backref.c btrfs: Fix up 32/64-bit compatibility for new ioctls
backref.h btrfs: added helper functions to iterate backrefs
btrfs_inode.h Btrfs: fix our reservations for updating an inode when completing io
compat.h Btrfs: drop remaining LINUX_KERNEL_VERSION checks and compat code
compression.c btrfs: separate superblock items out of fs_info
compression.h btrfs: rename variables clashing with global function names
ctree.c Btrfs: fix tree corruption after multi-thread snapshots and inode_cache flush
ctree.h Btrfs: fix deadlock on metadata reservation when evicting a inode
delayed-inode.c Btrfs: tweak the delayed inode reservations again
delayed-inode.h atomic: use <linux/atomic.h>
delayed-ref.c btrfs: remove old unused commented out code
delayed-ref.h btrfs: remove all unused functions
dir-item.c Btrfs: remove redundant code for dir item lookup
disk-io.c btrfs: mirror_num should be int, not u64
disk-io.h Merge branch 'for-chris' of git://github.com/sensille/linux into integration
export.c Merge branch 'ino-alloc' of git://repo.or.cz/linux-btrfs-devel into inode_numbers
export.h NFS support for btrfs - v3
extent-tree.c Btrfs: try cluster but don't advance in search list
extent_io.c Btrfs: drop spin lock when memory alloc fails
extent_io.h btrfs: mirror_num should be int, not u64
extent_map.c
extent_map.h
file-item.c
file.c
free-space-cache.c
free-space-cache.h
hash.h
inode-item.c
inode-map.c
inode-map.h
inode.c
ioctl.c
ioctl.h
locking.c
locking.h
lzo.c
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
reada.c
relocation.c
root-tree.c
scrub.c
struct-funcs.c
super.c
sysfs.c
transaction.c
transaction.h
tree-defrag.c
tree-log.c
tree-log.h
version.h
volumes.c
volumes.h
xattr.c
xattr.h
zlib.c