]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Btrfs: Make truncate(2) more ENOSPC friendly
authorYan, Zheng <zheng.yan@oracle.com>
Thu, 12 Nov 2009 09:35:36 +0000 (09:35 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:19:56 +0000 (13:19 -0700)
commit6a5b99b6b6439f054084b7a8611ebf426e826a0c
treea2f27e3ce537e852293423475e918b38bdd2dad2
parent16fdd7c37a308318379ec5ecc3fa1c32716df411
Btrfs: Make truncate(2) more ENOSPC friendly

commit 8082510e7124cc50d728f1b875639cb4e22312cc upstream.

truncating and deleting regular files are unbound operations,
so it's not good to do them in a single transaction. This
patch makes btrfs_truncate and btrfs_delete_inode start a
new transaction after all items in a tree leaf are deleted.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/btrfs/inode.c
fs/btrfs/relocation.c