https://github.com/torvalds/linux
Revision f4a2f4c548296168832ad4ab7e7f7b0cd0bf1214 authored by Miao Xie on 15 December 2011, 01:12:01 UTC, committed by Chris Mason on 15 December 2011, 15:50:35 UTC
Btrfsck report error 100 after the 83th case of xfstests was run, it means
the i_size of the file is wrong.

The reason of this bug is that:
Btrfs increased i_size of the file at the beginning, but it failed to expand
the file, and failed to update the i_size to the old size because there is no
enough space in the file system, so we found a wrong i_size.

This patch fixes this bug by updating the i_size just when we pass the file
expanding and get enough space to update i-node.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
1 parent 5dbc8fc
History
Tip revision: f4a2f4c548296168832ad4ab7e7f7b0cd0bf1214 authored by Miao Xie on 15 December 2011, 01:12:01 UTC
Btrfs: fix wrong i_size when truncating a file to a larger size
Tip revision: f4a2f4c
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1014 bytes
.mailmap -rw-r--r-- 4.1 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.6 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 196.7 KB
Makefile -rw-r--r-- 52.3 KB
README -rw-r--r-- 17.0 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top