Btrfs: fix deadlock with free space handling and user transactions
authorSage Weil <sage@newdream.net>
Tue, 29 Sep 2009 22:38:44 +0000 (18:38 -0400)
committerChris Mason <chris.mason@oracle.com>
Tue, 29 Sep 2009 23:50:07 +0000 (19:50 -0400)
commitdd7e0b7b02ccff73b87032e20fc5b4f2c1cfcc14
tree2168da63d84f05106b2aa8eb8f5cdc8859f1e176
parent1ab86aedbc7845a946b4ba4edf37762629970708
Btrfs: fix deadlock with free space handling and user transactions

If an ioctl-initiated transaction is open, we can't force a commit during
the free space checks in order to free up pinned extents or else we
deadlock.  Just ENOSPC instead.

A more satisfying solution that reserves space for the entire user
transaction up front is forthcoming...

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c