summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-06-28 13:15:52 +0800
committerChris Mason <chris.mason@fusionio.com>2013-08-09 19:28:56 -0400
commit7cddc193924ef6ce679ef0977e01e96d0aedfd1d (patch)
tree9784e641834f59f845ee6b4b307b7826ae0596c9 /fs/namei.c
parentc095ba7224d8edc71dcef0d655911399a8bd4a3f (diff)
downloadblackbird-op-linux-7cddc193924ef6ce679ef0977e01e96d0aedfd1d.tar.gz
blackbird-op-linux-7cddc193924ef6ce679ef0977e01e96d0aedfd1d.zip
btrfs: fix file truncation if FALLOC_FL_KEEP_SIZE is specified
Create a small file and fallocate it to a big size with FALLOC_FL_KEEP_SIZE option, then truncate it back to the small size again, the disk free space is not changed back in this case. i.e, total 4 -rw-r--r-- 1 root root 512 Jun 28 11:35 test Filesystem Size Used Avail Use% Mounted on .... /dev/sdb1 8.0G 56K 7.2G 1% /mnt -rw-r--r-- 1 root root 512 Jun 28 11:35 /mnt/test Filesystem Size Used Avail Use% Mounted on .... /dev/sdb1 8.0G 5.1G 2.2G 70% /mnt Filesystem Size Used Avail Use% Mounted on .... /dev/sdb1 8.0G 5.1G 2.2G 70% /mnt With this fix, the truncated up space is back as: Filesystem Size Used Avail Use% Mounted on .... /dev/sdb1 8.0G 56K 7.2G 1% /mnt Signed-off-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/namei.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud