On 2019/9/24 上午8:34, Charles Wright wrote:
> OK so I got an update to a 5.3.0-12 Ubuntu Kernel 3-4 day's ago and
> started having problems on my user data drive a 1TB drive that that I
> keep the usual ~/ directories (Documents , Downloads , Music, ect,ect)
> on and link back to ~/ in 4 installs on this box , so whatever install
> I'm booted to I have my data .
> 
> story hear 
> https://www.kubuntuforums.net/showthread.php/75909-strange-problem-on-testing-with-hwe-edge-5-3-0-12-kernel
> 
> the error I get in dmesg ,,,
> [  476.437134] BTRFS error (device sdb1): block=150186876928 read time
> tree block corruption detected
> [  476.437323] BTRFS critical (device sdb1): corrupt leaf: root=5
> block=150186876928 slot=3 ino=49938688, invalid inode generation: has
> 18446744073709551492 expect [0, 80501]

Just as it shows.
The expected range is [0, 80501], but you have a super large generation
number.

Doesn't that 18446744073709551492 looks strange? It's
0xffffffffffffff84, by somehow we overflow the generation number.

And tree-checker is doing its job, although not every user likes what
tree-checker is doing though. :(

> 
> and
> 
> [  762.622905] BTRFS error (device sdb1): block=150186876928 read time
> tree block corruption detected
> [  805.852391] BTRFS critical (device sdb1): corrupt leaf: root=5
> block=149315502080 slot=0 ino=49938701, invalid inode generation: has
> 18446744073709551492 expect [0, 80501]
> 
> this seems to be 2 directorys  the first "dwhelper" I can still see
> the directory but it lists as empty (it has 44 youtube videos in it )

Because the directory pointer (DIR_ITEM/DIR_INDEX) is in another leaf
with everything OK.
While to access the content of that dir, you need to read out the leaf
with the incorrect generation, thus triggering tree-checker, discarding
the rest content.

> the second you cant see the directory "steam" in Dolphin but "ls -la"
> shows this "d????????? ? ? ? ? ? steam"

Yep, similar reason.

> 
> if I boot the 5.0.0-30 kernel and enter the "dwhelper" directory and
> do "dmesg" their is this
> 
> [  199.522886] ata2.00: exception Emask 0x10 SAct 0x8000 SErr 0x2d0100
> action 0x6 frozen
> [  199.522891] ata2.00: irq_stat 0x08000000, interface fatal error
> [  199.522893] ata2: SError: { UnrecovData PHYRdyChg CommWake 10B8B BadCRC }
> [  199.522897] ata2.00: failed command: READ FPDMA QUEUED
> [  199.522902] ata2.00: cmd 60/08:78:a8:57:f3/00:00:12:00:00/40 tag 15
> ncq dma 4096 in
>                         res 50/00:08:a8:57:f3/00:00:12:00:00/40 Emask
> 0x10 (ATA bus error)
> [  199.522904] ata2.00: status: { DRDY }
> [  199.522908] ata2: hard resetting link
> [  199.837384] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
> [  199.840579] ata2.00: configured for UDMA/133
> [  199.840771] ata2: EH complete
> 
> but all works  as in I can access the files as normal
> 
> and in the 5.0.0-29 and 4.15.0-65 kernels no errors at all .
> 
> basic system info
> 
> Operating System: KDE neon Testing Edition
> KDE Plasma Version: 5.16.90
> KDE Frameworks Version: 5.63.0
> Qt Version: 5.12.3
> Kernel Version: 5.0.0-30-generic
> OS Type: 64-bit
> Processors: 8 × Intel® Core™ i7-4910MQ CPU @ 2.90GHz
> Memory: 15.6 GiB of RAM
> 
> the web page https://btrfs.wiki.kernel.org/index.php/Tree-checker
> asked to report an error like this hear , so her I am :)

The page works!

Now let's talk about how to fix it.

Btrfs-check hasn't implement the repair yet, but since you can mount
with older kernel, you can fix it by your self.

Just create a new directory using v5.0 kernel, move all the contents of
that offending directory to the new directory, then deleting the old
directory, then call it a day.

You may need to do it several times for each problem you hit.
If you're no happy with that, you could try to do a full rsync of any
old directories which is not created by any recent kernels.


For reference, would you please provide the following info before doing
the recovery?
So that I could confirm it's caused by older kernels.

# btrfs ins dump-tree -b 150186876928
# btrfs ins dump-tree -b 149315502080

Please be careful about the above dump, as it contains filenames.
Feel free to anonymize them.

Thanks,
Qu

> 
> any more info or tests you want me to run or provide I will ,,,,,, O
> hears some drive info
> 
> vinny@vinny-Bonobo-Extreme:~$ sudo parted -l
> [sudo] password for vinny:
> Model: ATA HGST HTS725050A7 (scsi)
> Disk /dev/sda: 500GB
> Sector size (logical/physical): 512B/4096B
> Partition Table: msdos
> Disk Flags:
> 
> Number  Start   End    Size    Type      File system     Flags
>  1      8225kB  323GB  323GB   primary   btrfs           boot
>  3      323GB   379GB  56.3GB  primary   ext4
>  4      379GB   496GB  117GB   extended
>  6      379GB   436GB  57.0GB  logical   ext4
>  5      436GB   496GB  59.8GB  logical   ext4
>  2      496GB   500GB  4295MB  primary   linux-swap(v1)
> 
> 
> Model: ATA HGST HTS721010A9 (scsi)
> Disk /dev/sdb: 1000GB
> Sector size (logical/physical): 512B/4096B
> Partition Table: gpt
> Disk Flags:
> 
> Number  Start   End     Size    File system  Name     Flags
>  1      1049kB  1000GB  1000GB  btrfs        primary
> 
> 
> Model: ATA Samsung SSD 860 (scsi)
> Disk /dev/sdc: 250GB
> Sector size (logical/physical): 512B/512B
> Partition Table: loop
> Disk Flags:
> 
> Number  Start  End    Size   File system  Flags
>  1      0.00B  250GB  250GB  btrfs
> 
> hope we can help each other .
> 
> Charles V. Wright
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to