Zac Medico posted on Fri, 24 Feb 2012 20:35:24 -0800 as excerpted:

> I've been using btrfs for temp storage, for more than a year

> The only problems I've experienced are:
> 
>  1) Intermittent ENOSPC when unpacking lots of files. Maybe this is
> related to having compression enabled. I haven't experienced it lately,
> so maybe it's fixed in recent kernels.

This is one of those "many bugs, same result" bugs.  The way btrfs 
allocates space is /extremely/ complicated, and based on what I read on-
list they've been fixing bugs in it, gradually reducing the ENOSPC 
triggers, for quite some time.

Last I read, the biggest remaining known one was indeed related to 
compression, apparently to a race condition of some sort, with one bit of 
code reaching the ENOSPC conclusion because it finished before the the 
actual processing code did.

However, apparently same bug could be triggered on uncompressed btrfs if 
it was stressed enough (rsyncing several gigs was a common duplicator).

Last I read they hadn't fully traced that one down in btrfs itself yet, 
but they had worked around the problem by throttling things further up 
the stack, in the kernel VFS code I believe.  The reasoning was that if a 
device was so overwhelmed it clearly couldn't keep up, regardless of the 
filesystem, throttling requests at the vfs level would put less pressure 
on the filesystem code, allowing things to work smoother.  It MAY (my own 
thought here) have been another application of the buffer-bloat work -- 
simply increasing buffer size and filling it even more doesn't help, when 
the bottleneck is further down the stack, rather the reverse!

AFAIK that's the present status for 3.3.  At least that one spurious 
ENOSPC trigger remains, but they've worked around it for now with the 
throttling, so it shouldn't hit anyone but those deliberately disabling 
the throttling in ordered to further test it, now.

But with luck, the stress-testing that Oracle QA's doing ATM will have 
found the root bug and it's fixed now too.  I hope...

>  2) Bug 353907 [1] which is fixed in recent kernels and coreutils.
> 
> [1] https://bugs.gentoo.org/show_bug.cgi?id=353907

That one could be another head of the same race-related root bug.  In 
fact, reading it and seeing that ext4 was affected as well, I'm wondering 
if that's what triggered the introduction of the throttling at the VFS 
level.

(NB: Interesting that I wasn't the only one to see that as an invitation 
to discuss btrfs.  At least my subthread has the subject changed so 
people that want can ignore it, tho.  I wish that had happened here too, 
but I guess it's kind of late to try and change it with this post, so...)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply via email to