Problems with Linux6.4 kernel? Error: BTRFS error device corrupt gen 0

I recently upgraded my kernel from Linux 6.3 to Linux 6.4 on my Manjaro system, with .
sudo mhwd-kernel -i linux64

However, after rebooting my computer, I noticed that some programs were not functioning properly. Upon checking my journal, I found the following error messages:

> BTRFS error (device nvme2n1p3): bdev /dev/nvme1n1p2 errs: wr 0, rd 0, flush 0, corrupt 2020, gen 0

and

[/dev/nvme1n1p2].corruption_errs  2525

Then I removed the linux6.4 and get back to Linux6.3, the problem still existed.
I checked the smart info too:

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

It appears that the nvme1n1 device is damaged, which is strange because I had just installed the Linux 6.4 kernel version.
Could this problem possible related to the Linux6.4 rc2?

I am unsure of how to proceed and would appreciate any help or advice on how to fix this issue. Thank you.

1 Like

Of course. Did you know that 6.4 is heavily experimental? There are untested features included. It is the mainline kernel. Not even stable. :face_with_peeking_eye:

I would suggest to scrub it:

export MP='/path/to/btrfs/mount'
sudo btrfs scrub start $MP && sudo watch -n1 "btrfs scrub status $MP" 
1 Like

Honestly, you shouldnā€™t bother using an RC kernel unless you use the Manjaro unstable branch. We have 6.4-rc6 in unstable. Issues you have with rc2 might have already been fixed.

Thanks, this is a disaster, Linux 6.4 includes some btrfs updates, I know it may have some problems, but I never expected it will damage my file system.

Scrub started:    Thu Jun 15 10:14:36 2023
Status:           running
Duration:         0:07:36
Time left:        finished
ETA:              Thu Jun 15 10:22:12 2023
Total to scrub    csum=77
  Corrected:      0  4
  Uncorrectable:  7757602
  Unverified:     0
ERROR: there are uncorrectable errors

Thanks for replying, you are right,

Currently I am on testing branch, I noticed Linux6.4 includes some btrfs updates, I thought it could improve file system performanceā€¦

so I installed the it with

sudo mhwd-kernel -r linux64

Looks like I have to reinstall the system.

ERROR: there are uncorrectable errors

I suggest, if you want to be bold with btrfs:

  • Please use RAID1
  • Please use timeshift (or even better, snapper)
  • Please use btrfs send to do backups of snapshots

You may have a look at

But be aware that BackSnap only supports snapper at the moment.
It uses btrfs send to backup all snapshots to a external disk.
But the snapshots need to be readonly (and timeshift does not take readonly snapshots)

good luck :+1:

1 Like

How is now, could linux6.4-rc be installed? I use btrfs in my system.

With a rc-kernel, the risk is at your side :innocent:

1 Like

Will it change/corrupt my filesystem to the point where I canā€™t uninstall the new kernel?

*I will wait for the final release.

I tested the latest version of Kernel 6.4 after the same upgrade on my test laptop with fully encryption disk (I do not care about this laptop, it is just test. No my data in it).
In the result, I can not produce this issue after testing:

  1. Run Btrfs defragmentation multiple times.
  2. Play hard-reset 3 times while running Btrfs balance including many snapshots.
  3. scrub, no error appears.
  4. Reboot then scrub, no error appears. :man_shrugging:
1 Like

I also have a few errors

BTRFS error (device dm-2): bdev /dev/mapper/crypthome errs: wr 0, rd 0, flush 0, corrupt 2117, gen 0
BTRFS warning (device dm-2): csum failed root 5 ino 6462069 off 1216512 csum 0xd3055d04714d537c9aa9d35ef37f6a5016ddf8b0518fcc829c3d4ff6637c7a7a expected csum 0x24628b3912dc5fc76b854cd5b9f605775a02860f5996e759a92c7fa575c61931 mirror 1

I donā€™t know when I last booted 6.4 and if I accessed the affected files, so it could be a coincidence.

So if this is still a thing in 6.4-rc6 tell the kernel developers know about please.
And if this where a big issue which effects many users phoronix.com will blog about it.
Anyway 6.4-rc7 is out and in unstable

There is now 6.4.0 released. I hope itā€™s fixed :crossed_fingers:

1 Like

is it now safe to use kernel64 with btrfs?

You are never safe on a mainline kernel.

1 Like

Well, I have btrfs as my file system, but not the normal btrfs system with that @, @home, i have directly ā€œ/', I did something wrong when installed, but is working after more or less a year, I can use " Btrfs Assistantā€ on it, doing Scrub and Balance.
I use rsync on timeshift to create backups.
For me there are no problems to report, the question is for this: