Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: HAN Yuwei <hrx@bupt.moe>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	Naohiro Aota <naohiro.aota@wdc.com>
Subject: Re: [BUG] unable to mount zoned volume after force shutdown
Date: Sun, 9 Jun 2024 20:03:17 +0930	[thread overview]
Message-ID: <d32e99bd-e83e-4449-a8f9-8eeefb813400@gmx.com> (raw)
In-Reply-To: <CD222A40B0129641+992beaf5-2aa9-4ad4-bb3f-ee915393bab1@bupt.moe>



在 2024/6/9 11:53, HAN Yuwei 写道:
> I can't mount volume on multiple zoned device which data profile is 
> single & metadata profile is raid1.
> It experienced multiple forced shutdown due to kernel 6.10 can't 
> properly shutdown on loongarch.
> 
> # dmesg
> 
> [ 1963.698793] BTRFS info (device sdb): first mount of filesystem 
> b5b2d7d9-9f27-4907-a558-77e8e86df933
> [ 1963.707801] BTRFS info (device sdb): using crc32c (crc32c-generic) 
> checksum algorithm
> [ 1963.715597] BTRFS info (device sdb): using free-space-tree
> [ 1965.492066] BTRFS info (device sdb): host-managed zoned block device 
> /dev/sdb, 52156 zones of 268435456 bytes
> [ 1966.953590] BTRFS info (device sdb): host-managed zoned block device 
> /dev/sdc, 52156 zones of 268435456 bytes
> [ 1967.346758] BTRFS info (device sdb): zoned mode enabled with zone 
> size 268435456
> [ 2026.287356] BTRFS error (device sdb): zoned: write pointer offset 
> mismatch of zones in raid1 profile
> [ 2026.296445] BTRFS error (device sdb): zoned: failed to load zone info 
> of bg 5399847632896

My guess is, due to the forced shutdown, btrfs' writer pointer is later 
than the zone write pointer.

IMHO, we should not error out but mark this zone as read-only and let 
balance to kick in.

@Johannes and @naohiro, mind to enhance the error handling there?

Thanks,
Qu
> [ 2026.304576] BTRFS error (device sdb): failed to read block groups: -5
> [ 2026.352547] BTRFS error (device sdb): open_ctree failed
> 
> # btrfs inspect-internal dump-super /dev/sdb
> superblock: bytenr=65536, device=/dev/sdb
> ---------------------------------------------------------
> csum_type               0 (crc32c)
> csum_size               4
> csum                    0xb27d8032 [match]
> bytenr                  65536
> flags                   0x1
>                          ( WRITTEN )
> magic                   _BHRfS_M [match]
> fsid                    b5b2d7d9-9f27-4907-a558-77e8e86df933
> metadata_uuid           00000000-0000-0000-0000-000000000000
> label                   HYWDATA_ZONED_TEST
> generation              80372
> root                    5400013160448
> sys_array_size          258
> chunk_root_generation   80368
> root_level              0
> chunk_root              4852941602816
> chunk_root_level        1
> log_root                0
> log_root_transid (deprecated)   0
> log_root_level          0
> total_bytes             28001039286272
> bytes_used              3306937974784
> sectorsize              16384
> nodesize                16384
> leafsize (deprecated)   16384
> stripesize              16384
> root_dir                6
> num_devices             2
> compat_flags            0x0
> compat_ro_flags         0x3
>                          ( FREE_SPACE_TREE |
>                            FREE_SPACE_TREE_VALID )
> incompat_flags          0x1341
>                          ( MIXED_BACKREF |
>                            EXTENDED_IREF |
>                            SKINNY_METADATA |
>                            NO_HOLES |
>                            ZONED )
> cache_generation        0
> uuid_tree_generation    80372
> dev_item.uuid           754f2932-38e5-46b4-93d2-dd699076879e
> dev_item.fsid           b5b2d7d9-9f27-4907-a558-77e8e86df933 [match]
> dev_item.type           0
> dev_item.total_bytes    14000519643136
> dev_item.bytes_used     1823750488064
> dev_item.io_align       16384
> dev_item.io_width       16384
> dev_item.sector_size    16384
> dev_item.devid          1
> dev_item.dev_group      0
> dev_item.seek_speed     0
> dev_item.bandwidth      0
> dev_item.generation     0
> 

  reply	other threads:[~2024-06-09 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-09  2:23 [BUG] unable to mount zoned volume after force shutdown HAN Yuwei
2024-06-09 10:33 ` Qu Wenruo [this message]
2024-06-10  8:47   ` Johannes Thumshirn
2024-06-10  8:53 ` Johannes Thumshirn
2024-06-10 12:47   ` HAN Yuwei
2024-06-10 14:13     ` Naohiro Aota
2024-06-11  6:48       ` HAN Yuwei
2024-08-11  6:19         ` Yuwei Han

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=d32e99bd-e83e-4449-a8f9-8eeefb813400@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=hrx@bupt.moe \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.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