linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: pepperpoint@mb.ardentcoding.com
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Read time tree block corruption detected
Date: Sat, 17 Jul 2021 08:57:46 -0000	[thread overview]
Message-ID: <162651226617.7.3584131829663375587.10186721@mb.ardentcoding.com> (raw)
In-Reply-To: <162650966150.7.11743767259405124657.10185986@simplelogin.co>

Hi Qu,

I don't know how the directory was created but last month, I used btrfs device add and btrfs device remove to move the filesystem from one partition to another. It failed because of the same error and was advised to use btrfs replace instead. I don't know if the error also happened before I move the file system as I don't have any previous logs.

Here is the result when I search for the inodes you mentioned if it helps:
# find /run/media/root -inum 260 -exec ls -ldi {} \;
260 -rw-r--r-- 1 root root 36864 Jun 25 06:22 /run/media/root/@vcache/live/snapshot/app-info/cache/en_US.cache
260 drwx------ 1 mongodb mongodb 136 Sep 12  2020 /run/media/root/@vlmongodb/live/snapshot/diagnostic.data
260 -rw-rw---- 1 mysql mysql 50331648 Sep 13  2015 /run/media/root/@vlmysql/live/snapshot/ib_logfile0
260 -rw-r----- 1 root lp 8641 Mar  5  2014 /run/media/root/@vspool/live/snapshot/cups/d00001-001
260 dr-xr-xr-x 1 root root 0 Sep 13  2013 /run/media/root/@/live/snapshot/sys
260 dr-xr-xr-x 1 root root 0 Sep 13  2013 /run/media/root/@/4/snapshot/sys

# find /run/media/root -inum 286 -exec ls -ldi {} \;
286 -rw-r--r-- 1 root root 96 Aug 16  2015 /run/media/root/@vcache/live/snapshot/fontconfig/4b172ca7f111e3cffadc3636415fead9-le64.cache-4
286 -rw-rw---- 1 mysql mysql 4096 Sep 15  2013 /run/media/root/@vlmysql/live/snapshot/mysql/columns_priv.MYI
286 -rw-r-----+ 1 root systemd-journal 16777216 Jul  4 01:14 /run/media/root/@vlog/live/snapshot/journal/5098dd7845ae46d3ba1826c68a809a7c/user-1000@fbd9f65d0ea349f6b996716280e6c4dd-00000000002314c5-0005c5cb84a3a438.journal

Directories with pattern /root/@<dir>/live/snapshot/ are subvolumes and directories with pattern /root/@<dir>/<num>/snapshot/ are snapshots of live.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Saturday, July 17th, 2021 at 4:14 PM, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:

> On 2021/7/17 下午3:51, pepperpoint@mb.ardentcoding.com wrote:
>
> > Hi Qu,
> >
> > Please see below for the dump.
> >
> > btrfs-progs v5.12.1
> >
> > leaf 174113599488 items 18 free space 2008 generation 1330906 owner 363
> >
> > leaf 174113599488 flags 0x1(WRITTEN) backref revision 1
> >
> > fs uuid a7d327c4-8594-4116-a6f8-8aa2a4162063
> >
> > chunk uuid f885f49e-14a0-4c80-9c12-c2302b9a0229
> >
> > item 0 key (5471 INODE_ITEM 0) itemoff 3835 itemsize 160
> >
> > generation 2063 transid 27726 size 40 nbytes 40
> >
> > block group 0 mode 100600 links 1 uid 0 gid 100 rdev 0
> >
> > sequence 1501 flags 0x0(none)
> >
> > atime 1386484844.468769570 (2013-12-08 14:40:44)
> >
> > ctime 1386484844.468769570 (2013-12-08 14:40:44)
> >
> > mtime 1386484844.468769570 (2013-12-08 14:40:44)
> >
> > otime 0.0 (1970-01-01 08:00:00)
> >
> > item 1 key (5471 INODE_REF 4399) itemoff 3824 itemsize 11
> >
> > index 12 namelen 1 name: 8
> >
> > item 2 key (5471 EXTENT_DATA 0) itemoff 3763 itemsize 61
> >
> > generation 27726 type 0 (inline)
> >
> > inline extent data size 40 ram_bytes 40 compression 0 (none)
> >
> > item 3 key (5645 INODE_ITEM 0) itemoff 3603 itemsize 160
> >
> > generation 2542 transid 61261 size 40 nbytes 40
> >
> > block group 0 mode 100600 links 1 uid 0 gid 100 rdev 0
> >
> > sequence 24769 flags 0x0(none)
> >
> > atime 1394335806.351857522 (2014-03-09 11:30:06)
> >
> > ctime 1394335827.344389955 (2014-03-09 11:30:27)
> >
> > mtime 1394335827.344389955 (2014-03-09 11:30:27)
> >
> > otime 0.0 (1970-01-01 08:00:00)
> >
> > item 4 key (5645 INODE_REF 4399) itemoff 3592 itemsize 11
> >
> > index 13 namelen 1 name: 7
> >
> > item 5 key (5645 EXTENT_DATA 0) itemoff 3531 itemsize 61
> >
> > generation 61261 type 0 (inline)
> >
> > inline extent data size 40 ram_bytes 40 compression 0 (none)
> >
> > item 6 key (7222 INODE_ITEM 0) itemoff 3371 itemsize 160
> >
> > generation 5754 transid 5767 size 307 nbytes 307
> >
> > block group 0 mode 100644 links 1 uid 0 gid 0 rdev 0
> >
> > sequence 7 flags 0x0(none)
> >
> > atime 1379834835.428558020 (2013-09-22 15:27:15)
> >
> > ctime 1379834835.428558020 (2013-09-22 15:27:15)
> >
> > mtime 1379834835.428558020 (2013-09-22 15:27:15)
> >
> > otime 0.0 (1970-01-01 08:00:00)
> >
> > item 7 key (7222 INODE_REF 287) itemoff 3344 itemsize 27
> >
> > index 6 namelen 17 name: dhcpcd-eth0.lease
> >
> > item 8 key (7222 EXTENT_DATA 0) itemoff 3016 itemsize 328
> >
> > generation 5767 type 0 (inline)
> >
> > inline extent data size 307 ram_bytes 307 compression 0 (none)
> >
> > item 9 key (7415 INODE_ITEM 0) itemoff 2856 itemsize 160
> >
> > generation 5904 transid 1330906 size 180 nbytes 0
> >
> > block group 0 mode 40755 links 2 uid 0 gid 0 rdev 0
> >
> > sequence 177 flags 0x0(none)
> >
> > atime 1483277713.141980592 (2017-01-01 21:35:13)
> >
> > ctime 1563162901.234656246 (2019-07-15 11:55:01)
> >
> > mtime 1406534032.158605559 (2014-07-28 15:53:52)
> >
> > otime 0.0 (1970-01-01 08:00:00)
>
> This inode is indeed a directory.
>
> But it has two hard links, which is definitely something unexpected.
>
> Under Linux we shouldn't have any hardlink for directory, as it would
>
> easily lead to loops.
>
> > item 10 key (7415 INODE_REF 260) itemoff 2837 itemsize 19
> >
> > index 28 namelen 9 name: backlight
>
> Its parent inode is 260 in the same root, with the name backlight.
>
> > item 11 key (7415 INODE_REF 286) itemoff 2818 itemsize 19
> >
> > index 3 namelen 9 name: backlight
>
> Another hardlink in inode 286, which is definitely a regular thing.
>
> Btrfs-progs lacks the ability to detect such problem, we need to enhance
>
> it first.
>
> But do you have any idea how this directory get created?
>
> It looks like the content of sysfs.
>
> Thanks,
>
> Qu
>
> > item 12 key (7415 DIR_ITEM 3128336373) itemoff 2746 itemsize 72
> >
> > location key (120417 INODE_ITEM 0) type FILE
> >
> > transid 117279 data_len 0 name_len 42
> >
> > name: pci-0000:00:02.0:backlight:intel_backlight
> >
> > item 13 key (7415 DIR_ITEM 3218198317) itemoff 2705 itemsize 41
> >
> > location key (7487 INODE_ITEM 0) type FILE
> >
> > transid 5992 data_len 0 name_len 11
> >
> > name: acpi_video0
> >
> > item 14 key (7415 DIR_ITEM 3582254411) itemoff 2638 itemsize 67
> >
> > location key (55325 INODE_ITEM 0) type FILE
> >
> > transid 63351 data_len 0 name_len 37
> >
> > name: platform-VPC2004:00:backlight:ideapad
> >
> > item 15 key (7415 DIR_INDEX 2) itemoff 2597 itemsize 41
> >
> > location key (7487 INODE_ITEM 0) type FILE
> >
> > transid 5992 data_len 0 name_len 11
> >
> > name: acpi_video0
> >
> > item 16 key (7415 DIR_INDEX 4) itemoff 2530 itemsize 67
> >
> > location key (55325 INODE_ITEM 0) type FILE
> >
> > transid 63351 data_len 0 name_len 37
> >
> > name: platform-VPC2004:00:backlight:ideapad
> >
> > item 17 key (7415 DIR_INDEX 5) itemoff 2458 itemsize 72
> >
> > location key (120417 INODE_ITEM 0) type FILE
> >
> > transid 117279 data_len 0 name_len 42
> >
> > name: pci-0000:00:02.0:backlight:intel_backlight
> >
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> >
> > On Saturday, July 17th, 2021 at 3:05 PM, Qu Wenruo quwenruo.btrfs@gmx.com wrote:
> >
> > > On 2021/7/17 上午9:45, pepperpoint@mb.ardentcoding.com wrote:
> > >
> > > > Hello,
> > > >
> > > > I see this message on dmesg:
> > > >
> > > > [ 2452.256756] BTRFS critical (device dm-0): corrupt leaf: root=363 block=174113599488 slot=9 ino=7415, invalid nlink: has 2 expect no more than 1 for dir
> > > >
> > > > [ 2452.256776] BTRFS error (device dm-0): block=174113599488 read time tree block corruption detected
> > >
> > > Please provide the following dump:
> > >
> > > btrfs ins dump-tree -b 174113599488 /dev/dm-0
> > > =============================================
> > >
> > > Thanks,
> > >
> > > Qu
> > >
> > > > When I run btrfs scrub and btrfs check, no error was detected.
> > > >
> > > > I am running Linux 5.12.15-arch1-1 and btrfs-progs v5.12.1
> > > >
> > > > How should I fix this error?

  parent reply	other threads:[~2021-07-17  8:57 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17  1:45 Read time tree block corruption detected pepperpoint
2021-07-17  7:05 ` Qu Wenruo
     [not found] ` <162650555086.7.16811903270475408953.10183708@simplelogin.co>
2021-07-17  7:51   ` pepperpoint
     [not found]   ` <162650826457.7.1050455337652772013.10184548@mb.ardentcoding.com>
2021-07-17  8:14     ` Qu Wenruo
     [not found]     ` <162650966150.7.11743767259405124657.10185986@simplelogin.co>
2021-07-17  8:57       ` pepperpoint [this message]
2021-07-17 10:12         ` Qu Wenruo
     [not found]         ` <162651674065.6.7912816287233908759.10188327@simplelogin.co>
2021-07-17 10:34           ` pepperpoint
     [not found]           ` <162651809235.7.7061042874033963922.10188873@mb.ardentcoding.com>
2021-07-17 10:48             ` Qu Wenruo
     [not found]             ` <162651892663.6.17938009695497100557.10189169@simplelogin.co>
2021-07-17 12:51               ` pepperpoint
     [not found]               ` <CQeY09U34m7SrT6nTAlkSQrbLJtmyKF1tDfuGDtKUkwJqujMI_nZU4MpGiU4F_Q1U3Lk1aWD1mFCT5SlsOsOcILWECflIw7EhVQTQpy_1Ts=@email.ardentcoding.com>
2021-07-18  5:26                 ` pepperpoint
2021-07-18  7:15                   ` Qu Wenruo
     [not found]                     ` <162659327011.8.12718249358254503695.10218325@simplelogin.co>
2021-07-18  8:46                       ` pepperpoint
     [not found]                       ` <162659797656.6.14385932343235367381.10220447@mb.ardentcoding.com>
2021-07-18  9:32                         ` Qu Wenruo
     [not found]                         ` <162660074747.7.3300740266059717894.10221270@simplelogin.co>
2021-07-18 10:34                           ` pepperpoint
     [not found]                           ` <162660447733.8.9782212603273165785.10222524@mb.ardentcoding.com>
2021-07-18 11:13                             ` Qu Wenruo
     [not found]                             ` <162660684635.8.12423097770824212671.10223516@simplelogin.co>
2021-07-18 12:16                               ` pepperpoint
  -- strict thread matches above, loose matches on Subject: below --
2021-11-22  5:26 read " x8062
2021-11-22  7:24 ` Nikolay Borisov
2021-11-22 10:07   ` x8062
2021-11-22 10:36     ` Nikolay Borisov
2021-11-23  2:42       ` x8062
2021-11-23  5:56         ` Nikolay Borisov
2021-04-16 19:35 Gervais, Francois
2021-04-17  1:01 ` Qu Wenruo
2021-04-19 13:20   ` Gervais, Francois
2021-04-19 13:33     ` Qu Wenruo
2021-04-19 14:56       ` Gervais, Francois
2021-04-20  1:34         ` Qu Wenruo
2021-04-20 14:19           ` Gervais, Francois
2021-04-20 23:47             ` Qu Wenruo
2021-04-21 14:17               ` Gervais, Francois
2021-04-21 23:01                 ` Qu Wenruo
2021-04-22 14:26                   ` Gervais, Francois
2021-05-26 23:03                     ` Gervais, Francois
2021-05-26 23:25                       ` Qu Wenruo
     [not found] <CAJheHN0FUe-ijMco1ZOc6iKF2zbPocOw+iiVNeTT1r-JuXOJww@mail.gmail.com>
2020-05-06 21:54 ` Fwd: Read " Tyler Richmond
2020-05-06 23:55   ` Chris Murphy
2020-05-07  0:51     ` Tyler Richmond
2020-05-07  1:06       ` Chris Murphy
2020-02-12 21:58 read " Samir Benmendil
2020-02-13  0:26 ` Qu Wenruo
2020-02-13 13:04   ` Samir Benmendil
2020-02-13 14:01   ` Qu Wenruo
2020-02-15 15:34     ` Samir Benmendil
2020-01-16 13:40 Peter Luladjiev
2020-01-16 16:12 ` Nikolay Borisov
     [not found]   ` <CA+ZCqs5=N5Hdf3NxZAmPCnA8wbcJPrcH8zM-fRbt-w8tL+TjUQ@mail.gmail.com>
2020-01-17  7:34     ` Nikolay Borisov
2020-01-17  7:51       ` Peter Luladjiev
2020-01-17  7:54         ` Peter Luladjiev
2020-01-17  7:59           ` Qu Wenruo
2020-01-17  8:14           ` Nikolay Borisov
2020-01-17  8:22             ` Peter Luladjiev
2020-01-17  9:10               ` Nikolay Borisov
2020-01-17 12:04                 ` Peter Luladjiev
2019-12-29 20:43 Patrick Erley
2019-12-29 22:07 ` Chris Murphy
2019-12-29 22:27   ` Patrick Erley
2019-12-29 22:32     ` Chris Murphy
2019-12-29 22:36       ` Patrick Erley
2019-12-29 23:11         ` Chris Murphy
2019-12-29 23:19           ` Patrick Erley
2019-12-29 23:24             ` Chris Murphy
2019-12-29 23:26               ` Patrick Erley
2019-12-30  0:46 ` Qu Wenruo
2019-12-30  5:36   ` Patrick Erley
2019-12-30  5:43     ` Qu Wenruo
2019-12-30  5:47       ` Patrick Erley
2019-12-30  5:50         ` Patrick Erley
2019-12-30  5:58           ` Qu Wenruo
2019-12-30  6:07             ` Patrick Erley
2019-12-30  6:09               ` Qu Wenruo
2019-12-30  8:14                 ` Patrick Erley
2019-12-30  8:54                   ` Qu Wenruo
2019-12-30  9:01                     ` Patrick Erley
2019-12-30  9:09                       ` Qu Wenruo
2019-12-30  9:21                         ` Patrick Erley
2019-12-30  9:27                           ` Qu Wenruo
2019-12-30 10:06                             ` Patrick Erley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162651226617.7.3584131829663375587.10186721@mb.ardentcoding.com \
    --to=pepperpoint@mb.ardentcoding.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).