]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: don't check bytes_pinned to determine if we should commit the transaction
authorJosef Bacik <josef@redhat.com>
Fri, 14 Oct 2011 17:37:45 +0000 (13:37 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:31 +0000 (21:20 -0500)
commit8ef1b7092bf340b59c33ce8bc9814f8848c002ab
treeb90894af1cb0708133c93196b7ac0b736fbc07e0
parenta4384fe4d9c9f568f11777d7b4c9e81794e331a9
Btrfs: don't check bytes_pinned to determine if we should commit the transaction

Before the only reason to commit the transaction to recover space in
reserve_metadata_bytes() was if there were enough pinned_bytes to satisfy our
reservation.  But now we have the delayed inode stuff which will hold it's
reservations until we commit the transaction.  So say we max out our reservation
by creating a bunch of files but don't have any pinned bytes we will ENOSPC out
early even though we could commit the transaction and get that space back.  So
now just unconditionally commit the transaction since currently there is no way
to know how much metadata space is being reserved by delayed inode stuff.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit bbb495c2ed9d34894cb3d6d366866fc92a2e1adc)
fs/btrfs/extent-tree.c