From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Jan Kara <jack@suse.cz>, Qu Wenruo <wqu@suse.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: Limit size of bios submitted from writeback
Date: Tue, 28 Apr 2026 09:18:38 +0930 [thread overview]
Message-ID: <0fd4ea4b-8f8a-4f0a-8923-17b038fe2745@gmx.com> (raw)
In-Reply-To: <50baea0e-fed6-4d7e-a9d5-d67ac67a7926@gmx.com>
在 2026/4/27 19:20, Qu Wenruo 写道:
[...]
>> Yeah, at this point I'm not sure the complexity is worth it. Normally
>> added
>> disks have very similar parameters as existing ones, also even if they
>> are
>> somewhat different, it will cost you a few percent of writeback speed at
>> worst which doesn't seem too bad and it will "fix" itself on next mount.
>
> Thanks, we're on the same page.
>
> Now the patch is pushed to for-next branch, with one typo "miliseconds"
> fixed.
>
> Thanks,
> Qu
Just a minor update.
The existing check is considering device->bdev always exists, but we can
have missing devices which doesn't have device->bdev, and this will
cause NULL pointer dereference during test cases like btrfs/027.
Fixed in for-next branch with the following small diff:
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 8d36e8a9f0d9..93a923e4ecaf 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -8224,6 +8224,8 @@ int btrfs_init_writeback_bio_size(struct
btrfs_fs_info *fs_info)
struct request_queue *queue;
unsigned int io_opt;
+ if (!device->bdev || test_bit(BTRFS_DEV_STATE_MISSING,
&device->dev_state))
+ continue;
queue = bdev_get_queue(device->bdev);
io_opt = queue_io_opt(queue) ? :
queue_max_sectors(queue) << SECTOR_SHIFT;
Thanks,
Qu
>>
>> Honza
>
>
next prev parent reply other threads:[~2026-04-27 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 9:30 [PATCH v2] btrfs: Limit size of bios submitted from writeback Jan Kara
2026-04-23 9:54 ` Qu Wenruo
2026-04-27 9:03 ` Jan Kara
2026-04-27 9:50 ` Qu Wenruo
2026-04-27 23:48 ` Qu Wenruo [this message]
2026-04-28 9:01 ` Jan Kara
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=0fd4ea4b-8f8a-4f0a-8923-17b038fe2745@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=jack@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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