From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 2/3] btrfs: zoned: fix compressed writes
Date: Mon, 24 May 2021 15:30:55 +0200 [thread overview]
Message-ID: <20210524133055.GS7604@twin.jikos.cz> (raw)
In-Reply-To: <3cba8426-5574-0da7-28bd-aa90eb9f18b8@gmx.com>
On Mon, May 24, 2021 at 09:04:40PM +0800, Qu Wenruo wrote:
> > This is the interesting part, it means we are just one sector beyond the
> > stripe boundary.
> > Definitely a sign of changed bio submission timing.
> >
> > Just like the code:
> >
> > + if (pg_index == 0 && use_append)
> > + len = bio_add_zone_append_page(bio, page, PAGE_SIZE, 0);
> > + else
> > + len = bio_add_page(bio, page, PAGE_SIZE, 0);
> > +
> > page->mapping = NULL;
> > - if (submit || bio_add_page(bio, page, PAGE_SIZE, 0) <
> > - PAGE_SIZE) {
> > + if (submit || len < PAGE_SIZE) {
> >
> > The code has changed the timing of bio_add_page().
> >
> > Previously, if we have submit == true, we won't even try to call
> > bio_add_page().
> >
> > But now, we will add the page even we're already at the stripe boundary,
> > thus it causes the extra sector being added to bio, and crosses stripe
> > boundary.
> >
> > This part is already super tricky, thus I refactored
> > submit_extent_page() to do a better job at stripe boundary calculation.
>
> BTW, I can also reproduce the problem in btrfs/027 using the latest
> misc-next branch.
>
> Thus to workaround the problem, I'm using the following diff, feel free
> to fold in to the offending patch.
The patch is now in master so we'll need a proper fix.
next prev parent reply other threads:[~2021-05-24 13:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 15:40 [PATCH v2 0/3] btrfs: zoned: fix writes on a compressed zoned filesystem Johannes Thumshirn
2021-05-18 15:40 ` [PATCH v2 1/3] btrfs: zoned: pass start block to btrfs_use_zone_append Johannes Thumshirn
2021-05-18 15:40 ` [PATCH v2 2/3] btrfs: zoned: fix compressed writes Johannes Thumshirn
2021-05-23 14:13 ` Josef Bacik
2021-05-23 23:09 ` Qu Wenruo
2021-05-24 13:04 ` Qu Wenruo
2021-05-24 13:30 ` David Sterba [this message]
2021-05-25 6:31 ` Johannes Thumshirn
2021-05-25 5:46 ` Johannes Thumshirn
2021-06-10 7:27 ` Qu Wenruo
2021-06-10 7:36 ` Damien Le Moal
2021-06-10 7:41 ` Qu Wenruo
2021-06-10 7:45 ` Damien Le Moal
2021-06-10 7:51 ` Qu Wenruo
2021-06-10 8:28 ` Johannes Thumshirn
2021-05-18 15:40 ` [PATCH v2 3/3] btrfs: zoned: factor out zoned device lookup Johannes Thumshirn
2021-05-24 10:00 ` Qu Wenruo
2021-05-25 9:11 ` Johannes Thumshirn
2021-05-20 15:05 ` [PATCH v2 0/3] btrfs: zoned: fix writes on a compressed zoned filesystem 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=20210524133055.GS7604@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=johannes.thumshirn@wdc.com \
--cc=josef@toxicpanda.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).