Re: migrating to space_cache=2 and btrfs userspace commands
From: Qu Wenruo <hidden>
Date: 2021-07-14 07:07:12
On 2021/7/14 下午2:54, DanglingPointer wrote:
Yep that's what I'm referring to here: https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5) Thanks for the prompt respone Qu! So just to confirm, our scheduled cron jobs to scrub will still work with space_cache=v2?
Yep. No worry. Just to be more accurate, btrfs-progs has two parts: - Ioctl related part Things like "scrub", "subvolume", "filesystem", "device" and etc are all ioctl related commands. They just call kernel ioctls to do the job. For those commands, they are way more independent, and seldomly get affected by btrfs-progs version. - Offline read/write part Things like "mkfs.btrfs", "btrfs check", "btrfs-convert" are the main commands in this part. They relies on the btrfs-progs implementation on how to read/write btrfs. That's why we always recommend the latest btrfs-progs for "btrfs check". Thanks, Qu
On 14/7/21 4:05 pm, Qu Wenruo wrote:quoted
On 2021/7/14 下午1:44, Chris Murphy wrote:quoted
On Tue, Jul 13, 2021 at 10:59 PM Qu Wenruo [off-list ref] wrote:quoted
On 2021/7/13 下午11:38, DanglingPointer wrote:quoted
quoted
2. If we use space_cache=v2, is it indeed still the case that the "btrfs" command will NOT work with the filesystem?Why would you think "btrfs" won't work on a btrfs?Maybe this? man 5 btrfs, space_cache includes: The btrfs(8) command currently only has read-only support for v2. A read-write command may be run on a v2 filesystem by clearing the cache, running the command, and then remounting with space_cache=v2.Oh, that's only for offline tools writing into the fs, namingly "btrfs check --repair" and "mkfs.btrfs -R" And I believe that sentence is now out-of-date after btrfs-progs v4.19, which pulls all the support for write time free space tree (v2 space cache). I'll soon send out a patch to fix that. Thanks, Qu