On 10/10/2018 7:55 PM, Hans van Kranenburg wrote:
On 10/10/2018 07:44 PM, Chris Murphy wrote:
I'm pretty sure you have to umount, and then clear the space_cache
with 'btrfs check --clear-space-cache=v1' and then do a one time mount
with -o space_cache=v2.
The --clear-space-cache=v1 is optional, but recommended, if you are
someone who do not likes to keep accumulated cruft.
The v2 mount (rw mount!!!) does not remove the v1 cache. If you just
mount with v2, the v1 data keeps being there, doing nothing any more.
Theoretically I have the v2 space_cache enabled. After a clean umount...
# mount -onospace_cache /backups
[ 391.243175] BTRFS info (device dm-3): disabling free space tree
[ 391.249213] BTRFS error (device dm-3): cannot disable free space tree
[ 391.255884] BTRFS error (device dm-3): open_ctree failed
# mount -ospace_cache=v1 /backups/
mount: /backups: wrong fs type, bad option, bad superblock on
/dev/mapper/Cached-Backups, missing codepage or helper program, or other
error
[ 983.501874] BTRFS info (device dm-3): enabling disk space caching
[ 983.508052] BTRFS error (device dm-3): cannot disable free space tree
[ 983.514633] BTRFS error (device dm-3): open_ctree failed
# btrfs check --clear-space-cache v1 /dev/Cached/Backups
Opening filesystem to check...
couldn't open RDWR because of unsupported option features (3).
ERROR: cannot open file system
# btrfs --version
btrfs-progs v4.17.1
# mount /backups/
[ 1036.840637] BTRFS info (device dm-3): using free space tree
[ 1036.846272] BTRFS info (device dm-3): has skinny extents
[ 1036.999456] BTRFS info (device dm-3): bdev /dev/mapper/Cached-Backups
errs: wr 0, rd 0, flush 0, corrupt 666, gen 25
[ 1043.025076] BTRFS info (device dm-3): enabling ssd optimizations
Backups will run tonight and will beat on the FS. Perhaps if something
interesting happens I'll have more log data.
--Larkin