summaryrefslogtreecommitdiff
path: root/fs/btrfs/xattr.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2011-09-11 10:52:25 -0400
committerChris Mason <chris.mason@oracle.com>2011-09-11 10:52:25 -0400
commita39f75214358d715efa21e2bccf5a709d8649144 (patch)
tree09123dcd9bc9eec46bf76fdd32c42105c299a78f /fs/btrfs/xattr.c
parent0c1a98c81413e00a6c379d898e06a09350d31926 (diff)
Btrfs: fix wrong nbytes information of the inode
If we write some data into the data hole of the file(no preallocation for this hole), Btrfs will allocate some disk space, and update nbytes of the inode, but the other element--disk_i_size needn't be updated. At this condition, we must update inode metadata though disk_i_size is not changed(btrfs_ordered_update_i_size() return 1). # mkfs.btrfs /dev/sdb1 # mount /dev/sdb1 /mnt # touch /mnt/a # truncate -s 856002 /mnt/a # dd if=/dev/zero of=/mnt/a bs=4K count=1 conv=nocreat,notrunc # umount /mnt # btrfsck /dev/sdb1 root 5 inode 257 errors 400 found 32768 bytes used err is 1 Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/xattr.c')
0 files changed, 0 insertions, 0 deletions