Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: Matthew Wilcox <willy@infradead.org>, linux-btrfs@vger.kernel.org
Subject: error writing primary super block on zoned btrfs
Date: Mon, 18 Jul 2022 07:49:44 +0200	[thread overview]
Message-ID: <20220718054944.GA22359@lst.de> (raw)

Hi Naohiro, (and willy for insights on the pagecache, see below),

when running plain fsx on zoned btrfs on a null_blk devices as below:

dev="/sys/kernel/config/nullb/nullb1"
size=12800 # MB

mkdir ${dev}
echo 2 > "${dev}"/submit_queues
echo 2 > "${dev}"/queue_mode
echo 2 > "${dev}"/irqmode
echo "${size}" > "${dev}"/size
echo 1 > "${dev}"/zoned
echo 0 > "${dev}"/zone_nr_conv
echo 128 > "${dev}"/zone_size
echo 96 > "${dev}"/zone_capacity
echo 14 > "${dev}"/zone_max_active
echo 1 > "${dev}"/memory_backed
echo 1000000 > "${dev}"/completion_nsec
echo 1 > "${dev}"/power
mkfs.btrfs -m single /dev/nullb1
mount /dev/nullb1 /mnt/test/
~/xfstests-dev/ltp/fsx /mnt/test/foobar

fsx will eventually after ~10 minutes fail with the following left
in dmesg:

[ 1185.480200] BTRFS error (device nullb1): error writing primary super block to device 1
[ 1185.480988] BTRFS: error (device nullb1) in write_all_supers:4488: errno=-5 IO failure (1 errors while writing supers)
[ 1185.481971] BTRFS info (device nullb1: state E): forced readonly
[ 1185.482521] BTRFS: error (device nullb1: state EA) in btrfs_sync_log:3341: errno=-5 IO failure

I tracked this down to the find_get_page call in wait_dev_supers
returning NULL, and digging furter it seems to come from
xa_is_value() in __filemap_get_folio returnin true.  I'm not sure
why we'd see a value here in the block device mapping and why that
only happens in zoned mode (the same config on regular device ran
for 10 hours last night).


             reply	other threads:[~2022-07-18  5:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18  5:49 Christoph Hellwig [this message]
2022-07-18 12:28 ` error writing primary super block on zoned btrfs Matthew Wilcox
2022-07-18 12:33   ` Christoph Hellwig
2022-07-19  7:53   ` Johannes Thumshirn
2022-07-19 15:13     ` Christoph Hellwig
2022-07-19 21:32       ` David Sterba
2022-07-25 17:36         ` David Sterba

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=20220718054944.GA22359@lst.de \
    --to=hch@lst.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox