On 2018年04月21日 22:55, Dmitrii Tcvetkov wrote:
> TL;DR It seems as regression in 4.17, but I managed to find a
> workaround to make filesystem rw mountable again.
> 
> Kernel built from tag v4.17-rc1
> btrfs-progs 4.16
> 
> Tonight two my machines (PC (ECC RAM) and laptop(non-ECC RAM)) were
> doing usual weekly balance with this command via cron:
> btrfs balance start -musage=50 -dusage=50 <mountpoint>
> Both machines run same kernel version. 
> 
> On PC that caused root and "data" filesystems to go readonly. Root is on
> an SSD with data single and metadata DUP, "data" filesystem is on 2 HDDs
> with RAID1 for data and metadata.
> 
> On laptop only /home went ro, it's on NVMe SSD with data single and
> metadata DUP. 
> 
> Btrfs check of PC rootfs was without any errors in both modes, I did
> them once each before reboot on readonly filesystem with --force flag
> and then from live usb. Same output without any errors.
> 
> After reboot kernel refused rw mount rootfs with the same error as
> during cron balance, ro mount was accepted, error during rw mount:
> BTRFS: error (device dm-17) in merge_reloc_roots:2465: errno=-117

117 means EUCLEAN, which could be caused by the newly introduced
first_key and level check.

Please apply this hotfix to fix it.
btrfs: Only check first key for committed tree blocks
(Which is included in latest pull request)

Also, please consider enable CONFIG_BTRFS_DEBUG to provide extra debug info.

Thanks,
Qu

> unknown BTRFS info (device dm-17): forced readonly BTRFS info (device
> dm-17): delayed_refs has NO entry BTRFS error (device dm-17): cleaner
> transaction attach returned -3
> 
> mount rw with skip_balance parameter didn't help to mount.
> 
> After that I mounted rw the rootfs with 4.16.2 kernel, mount was
> successful and kernel finished balance. After that the filesystem is
> mountable rw by 4.17-rc1 kernel without errors, btrfs check is clean
> too.
> 
> Data filesystem behaves the same, rw mount on 4.17-rc1 kernel yields:
> [ 2321.370113] BTRFS: error (device dm-17) in merge_reloc_roots:2465:
> errno=-117 unknown [ 2321.370119] BTRFS warning (device dm-17): failed
> to recover relocation: -30 [ 2321.370137] BTRFS info (device dm-17):
> delayed_refs has NO entry [ 2321.370155] BTRFS error (device dm-17):
> cleaner transaction attach returned -30 [ 2321.414219] BTRFS error
> (device dm-17): open_ctree failed
> 
> Rw mount on 4.16.2 goes ok and after balance finishes the filesystem is
> mountable by 4.17-rc1 again. I saved /home filesystem from laptop in
> unmountable by 4.17-rc1 state and can test patches and/or create
> btrfs-image if it's needed.
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to