On 6/15/23 14:43, Adam Mizerski wrote:
W dniu 15.06.2023 o 20:14, Joe Salmeri pisze:
There seems to be conflicting documentation regarding btrfs space_cache v1 and v2 as to which is really the default.
man 5 btrfs says:
**space_cache, space_cache=<version>, nospace_cache (nospace_cachesince: 3.2, space_cache=v1and space_cache=v2since 4.5, *default: **space_cache=v1**) *
There are two implementations of the free space cache. The original one, referred to as v1, is the safe default. The v1space cache can be disabled at mount time with nospace_cachewithout clearing.
* If a version is not explicitly specified, the default implementation will be chosen, which is **v1**. ** * https://btrfs.readthedocs.io/en/latest/Administration.html says:
(/nospace_cache/since: 3.2,/space_cache=v1/and/space_cache=v2/since 4.5, *default:****/space_cache=v2/**)*
There are two implementations of the free space cache. *The original one, referred to as****/v1/**, used to be a safe default but has been superseded by****/v2/**.* The/v1/space cache can be
disabled at mount time with/nospace_cache/without clearing.
* If a version is not explicitly specified, the default implementation will be chosen, which is****/v2/**.*
Does anyone know which documentation is correct ? I would have expected the man pages to be correct, however, it would appear to me they are outdated and the btrfs.readthedocs .io is probably more current.
My TW installation is from before v2 existed, did all the zypper dups I've done since TW installation update my btrfs root to v2 or is this something we need to manually do?
If it needs to be done, it looks like it is fairly easy to do for a non-root fs, via clearing and remounting, but is there any docs for the root fs ?
Has anybody with older TW installs switched or did you just stay with v1 ?
It seems like it matters most for large many TB fs and may not matter for smaller fs ( like say 500 GB ).
-- Regards,
Joe
1) My "man 5 btrfs" says the default is v2. I'm on Tumbleweed. 2) The change in documentation was 2 months ago: https://github.com/kdave/btrfs-progs/commit/79bb885c08a5ac23d4ee5597b3e1c9ac...
I'm on TW 20230514 because I had some projects going on and didn't have time to update but that update is still 1 month AFTER the documentation update timeframe you mentioned. One would expect that with how quickly TW updates it would have been there by the time I updated to 20230514. I always do zypper dup, so wonder why "man 5 btrfs" still says the default is v1 for me? I will be updating soon as the project I was working on wound down, but the bigger questions were whether TW would the root fs migration to space_cache v2 or if we will have to manually do it. Did you check to see which version of space_cache you are using ? That default is for a new fs so unless TW dup includes an migration for the root fs nobody will be updated unless they do it themselves. I am curious as to if others are using it as I'd prefer not to be the first one :-) -- Regards, Joe