Stefan Priebe - Profihost AG posted on Mon, 09 May 2016 14:59:25 +0200 as
excerpted:

> Am 03.05.2016 um 00:05 schrieb Omar Sandoval:
>> On Fri, Apr 29, 2016 at 10:48:15PM +0200, Stefan Priebe wrote:
>>> just want to drop a note that all those ENOSPC msg are gone with v4.5
>>> and space_cache=v2. Any plans to make space_cache=v2 default?
>>>
>> Yup, we want to make space_cache=v2 the default at some point. I'm
>> running it on my own machines and testing it here at Facebook and
>> haven't run into any issues yet. Besides stability, I also want to make
>> sure there aren't any performance regressions versus the old free space
>> cache that we haven't thought about yet.
>> 
>> Thanks for trying it out :)
> 
> Can i patch v2 as a default for me? I just looked at the code but didn't
> find an easy way to make v2 the default.

Based on previous posts, space_cache=v2 will rewrite the cache to tree 
form, and it'll stay that way (thus your default) until you specifically 
use the clear-cache option.

IOW, the code detects existing v1 or v2 and continues to use it until a 
clear-cache mount and no v2 set on the mount after, to switch back to v1, 
or a space_cache=v2 to switch to it.

IOW, the space_cache option doesn't need set more than once (and for v1, 
it doesn't actually need set at all, except perhaps after a clear_cache, 
I've never specifically set space_cache here, but it's always listed in 
the mount output and /proc/self/mounts).  After that it carries on the 
way it was.

Or did you mean that you're creating enough new btrfs that using 
space_cache=v2 even once is difficult, and you'd like to patch it to use 
v2 from the get-go?  Presumably that can indeed be patched in, but not 
being a dev, even if I could figure out a patch that worked for it, 
there's a fair chance it would be more a hack than proper code.  (As an 
admin I have a patch that switches the normal relatime default to noatime, 
so I don't have to have it in all my fstab entries, etc, and it works, 
but it's clearly a hack compared to what a proper dev would code.)

-- 
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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to