btrfs-progs: find_free_dev_extent() closer to kernel code
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Thu, 1 Dec 2016 17:28:33 +0000 (11:28 -0600)
committerDavid Sterba <dsterba@suse.com>
Wed, 14 Dec 2016 14:06:35 +0000 (15:06 +0100)
commit16c21852f1cc1f47ee5d73f68f924ae5a4213e1d
tree956ac5f5cc22a52f847c4277ed3ec6c2ed5d82a3
parent11315213aa88b147348d936cff6d1038e4b20c0d
btrfs-progs: find_free_dev_extent() closer to kernel code

This solves an ENOSPC issue with nearly full filesystems.

The only things missing from the function is contains_pending_extent()
which should not be required in this case.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
volumes.c