]> rtime.felk.cvut.cz Git - linux-imx.git/commit
Btrfs: wait on async pages when shrinking delalloc
authorJosef Bacik <jbacik@fusionio.com>
Thu, 6 Sep 2012 20:47:00 +0000 (16:47 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:15 +0000 (15:19 -0400)
commitdea31f52337c18f19eadfbbccb0c477942dad495
tree1088f1de2b69f6d8af1de1c57a40de64b6872d31
parent9e8a4a8b0b9484e8d14674fc62c9ad8ac9dbce5b
Btrfs: wait on async pages when shrinking delalloc

Mitch reported a problem where you could get an ENOSPC error when untarring
a kernel git tree onto a 16gb file system with compress-force=zlib.  This is
because compression is a huge pain, it will return from ->writepages()
without having actually created any ordered extents.  To get around this we
check to see if the async submit counter is up, and if it is wait until it
drops to 0 before doing our normal ordered wait dance.  With this patch I
can now untar a kernel git tree onto a 16gb file system without getting
ENOSPC errors.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c