Btrfs: Integrate metadata reservation with start_transaction
authorYan, Zheng <zheng.yan@oracle.com>
Sun, 16 May 2010 14:48:46 +0000 (10:48 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 25 May 2010 14:34:50 +0000 (10:34 -0400)
commita22285a6a32390195235171b89d157ed1a1fe932
tree3fabc88a029e1af4f2fdcc708e7b62ef3cf3703a
parentf0486c68e4bd9a06a5904d3eeb3a0d73a83befb8
Btrfs: Integrate metadata reservation with start_transaction

Besides simplify the code, this change makes sure all metadata
reservation for normal metadata operations are released after
committing transaction.

Changes since V1:

Add code that check if unlink and rmdir will free space.

Add ENOSPC handling for clone ioctl.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 files changed:
fs/btrfs/ctree.h
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/inode-item.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/relocation.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h
fs/btrfs/volumes.c
fs/btrfs/xattr.c