All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferry Toth <fntoth@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Errors on newly created file system
Date: Sun, 20 Apr 2025 23:45:54 +0200	[thread overview]
Message-ID: <669c174e-5835-471f-9065-279a7da8f190@gmail.com> (raw)

The following is originally done by Yocto's bitbake, but when I try 
manually it reproduces.

I create a new fs on  a file using -r as ordinary user, then btrfs check 
the file (before or after mounting makes no difference), also as an 
ordinary user.

The fs has 1000's of errors, I cut most because it seems the same type 
of errors. The files system is unrepaired bootable, but can be repaired 
using --repair, in which 1000's of files are moved to lost+found.

The below was mkfs on a non-existing file, but writing to 16GB dduped 
file (rootfs is 1.4GB) makes no difference. Neither does dropping 
--shrink, -m or -n.

Also, writing the file to an actual disk and then check the disk gives 
the same errors.

What could this be?

ferry@delfion:~/tmp/edison/edison-scarthgap$ mkfs.btrfs -n 4096 --shrink 
-M -v -r 
/home/ferry/tmp/edison-intel/my/edison-morty/out/linux64/build/tmp/work/edison-poky-linux/edison-image/1.0/rootfs 
edison-image-edison.rootfs.btrfs
btrfs-progs v6.6.3
See https://btrfs.readthedocs.io for more information.

ERROR: zoned: unable to stat edison-image-edison.rootfs.btrfs
NOTE: several default settings have changed in version 5.15, please make 
sure
       this does not affect your deployments:
       - DUP for metadata (-m dup)
       - enabled no-holes (-O no-holes)
       - enabled free-space-tree (-R free-space-tree)

Rootdir from: 
/home/ferry/tmp/edison-intel/my/edison-morty/out/linux64/build/tmp/work/edison-poky-linux/edison-image/1.0/rootfs
   Shrink:           yes
Label:              (null)
UUID:               c2ecfaca-168a-401b-a12a-e73694d7485a
Node size:          4096
Sector size:        4096
Filesystem size:    1.43GiB
Block group profiles:
   Data+Metadata:    single            1.42GiB
   System:           single            4.00MiB
SSD detected:       no
Zoned device:       no
Incompat features:  mixed-bg, extref, skinny-metadata, no-holes, 
free-space-tree
Runtime features:   free-space-tree
Checksum:           crc32c
Number of devices:  1
Devices:
    ID        SIZE  PATH
     1     1.43GiB  edison-image-edison.rootfs.btrfs

ferry@delfion:~/tmp/edison/edison-scarthgap$ btrfs check 
edison-image-edison.rootfs.btrfs
Opening filesystem to check...
Checking filesystem on edison-image-edison.rootfs.btrfs
UUID: c2ecfaca-168a-401b-a12a-e73694d7485a
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
root 5 inode 252551099 errors 2000, link count wrong
         unresolved ref dir 260778488 index 2 namelen 11 name 
COPYING.MIT filetype 1 errors 0
root 5 inode 252551611 errors 2000, link count wrong
         unresolved ref dir 260775820 index 79 namelen 18 name 
generic_Apache-2.0 filetype 1 errors 0
root 5 inode 252575069 errors 2000, link count wrong
         unresolved ref dir 260777976 index 3 namelen 10 name recipeinfo 
filetype 1 errors 0
root 5 inode 252575538 errors 2000, link count wrong
         unresolved ref dir 260778506 index 3 namelen 10 name recipeinfo 
filetype 1 errors 0
root 5 inode 252577241 errors 2000, link count wrong
         unresolved ref dir 260777972 index 3 namelen 10 name recipeinfo 
filetype 1 errors 0
root 5 inode 256713617 errors 2000, link count wrong
         unresolved ref dir 260776096 index 3 namelen 12 name 
GPL-2.0-only filetype 1 errors 0
root 5 inode 256713619 errors 2000, link count wrong
         unresolved ref dir 260776096 index 5 namelen 13 name 
LGPL-2.1-only filetype 1 errors 0
root 5 inode 256713620 errors 2000, link count wrong
         unresolved ref dir 260776096 index 6 namelen 10 name recipeinfo 
filetype 1 errors 0
root 5 inode 256730804 errors 2000, link count wrong
         unresolved ref dir 260777541 index 3 namelen 7 name COPYING 
filetype 1 errors 0
         unresolved ref dir 260777543 index 3 namelen 7 name COPYING 
filetype 1 errors 0
root 5 inode 256730805 errors 2000, link count wrong
         unresolved ref dir 260777541 index 4 namelen 11 name 
COPYING.LIB filetype 1 errors 0
         unresolved ref dir 260777543 index 4 namelen 11 name 
COPYING.LIB filetype 1 errors 0
root 5 inode 256730806 errors 2000, link count wrong
         unresolved ref dir 260777541 index 5 namelen 15 name 
COPYING.RUNTIME filetype 1 errors 0
         unresolved ref dir 260777543 index 5 namelen 15 name 
COPYING.RUNTIME filetype 1 errors 0
root 5 inode 256730807 errors 2000, link count wrong
         unresolved ref dir 260777541 index 6 namelen 8 name COPYING3 
filetype 1 errors 0
         unresolved ref dir 260777543 index 6 namelen 8 name COPYING3 
filetype 1 errors 0
root 5 inode 256730808 errors 2000, link count wrong
         unresolved ref dir 260777541 index 7 namelen 12 name 
COPYING3.LIB filetype 1 errors 0
         unresolved ref dir 260777543 index 7 namelen 12 name 
COPYING3.LIB filetype 1 errors 0

...

         unresolved ref dir 260777434 index 4 namelen 10 name recipeinfo 
filetype 1 errors 0
         unresolved ref dir 260777436 index 4 namelen 10 name recipeinfo 
filetype 1 errors 0
         unresolved ref dir 260777438 index 4 namelen 10 name recipeinfo 
filetype 1 errors 0
root 5 inode 260775819 errors 2000, link count wrong
         unresolved ref dir 260775820 index 2 namelen 16 name 
license.manifest filetype 1 errors 0
ERROR: errors found in fs roots
found 1061572608 bytes used, error(s) found
total csum bytes: 990472
total tree bytes: 47329280
total fs tree bytes: 44457984
total extent tree bytes: 1511424
btree space waste bytes: 11573386
file data blocks allocated: 1014243328
  referenced 1014243328


             reply	other threads:[~2025-04-20 21:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-20 21:45 Ferry Toth [this message]
2025-04-20 22:00 ` Errors on newly created file system Qu Wenruo
2025-04-22 21:32   ` Ferry Toth
2025-04-22 22:00     ` Qu Wenruo
2025-04-23 16:06       ` Ferry Toth
2025-04-23 23:24         ` Qu Wenruo
2025-04-24 11:31           ` Ferry Toth
2025-04-24 20:11             ` Ferry Toth
2025-04-24 20:49               ` Qu Wenruo
2025-04-24 21:16                 ` Ferry Toth
2025-04-26 21:01                   ` Ferry Toth
2025-04-26 20:42           ` Ferry Toth

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=669c174e-5835-471f-9065-279a7da8f190@gmail.com \
    --to=fntoth@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.