On 2019/10/6 上午1:14, Remi Gauvin wrote: > On 2019-09-30 9:53 p.m., Qu Wenruo wrote: > >> >> It's indeed a symptom of btrfs kernel module bug. But at least looks >> repairable. >> > > As advertised, btrfs --check repair restored the FS to full function. Yep, btrfs check --repair is getting better and better. As long as btrfs check (no --repair) after --repair reports no error, you're completely OK to go. But as you already found, btrfs check (by default) only cares metadata, while ignores all data, so you still need another scrub to fix data error. In fact you can use --check-data-csum to make btrfs check to check/repair data csum error too. (kinda like scrub). > > A follow-up scrub even found and corrected some corrupt data on one of > the disks, that went completely unreported by the disk itself. So, > despite this hiccup, BTRFS did it's job admirably. > > > Whenever I do any further btrfs check after cleanly unmounting the > filesystem, I get this error: > > cache and super generation don't match, space cache will be invalidated It's not an error, just a warning. Kernel will just discard that cache. > > Even mounting with clear_cache,nospace_cache , (then mounting again with > space_cache=v2) does not remove this warning. But it doesn't seem to be > causing any problems.. There are no warnings about the space cache in > the dmesg log when the filesystem is mounted. Clear cache doesn't really clear the cache. Only block group got modified will delete its cache file. To fully clear the cache, you can go btrfs check --clear-space-cache v1. Thanks, Qu