From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: shutdown on failure to add page to log bio
Date: Wed, 25 Mar 2020 10:24:24 +1100 [thread overview]
Message-ID: <20200324232424.GC10776@dread.disaster.area> (raw)
In-Reply-To: <20200324165700.7575-1-bfoster@redhat.com>
On Tue, Mar 24, 2020 at 12:57:00PM -0400, Brian Foster wrote:
> If the bio_add_page() call fails, we proceed to write out a
> partially constructed log buffer. This corrupts the physical log
> such that log recovery is not possible. Worse, persistent
> occurrences of this error eventually lead to a BUG_ON() failure in
> bio_split() as iclogs wrap the end of the physical log, which
> triggers log recovery on subsequent mount.
I'm a little unclear on how this can happen - the iclogbuf can only
be 256kB - 64 pages - and we always allocation a bio with enough
bvecs to hold 64 pages. And the ic_data buffer we are adding to the
bio is also statically allocated so I'm left to wonder exactly how
this is failing.
i.e. this looks like code that shouldn't ever fail, yet it
apparently is, and I have no idea what is causing that failure...
That said, shutting down on failure is the right thing to do, so the
code looks good. I just want to know how the bio_add_page() failure
is occurring.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2020-03-24 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 16:57 [PATCH] xfs: shutdown on failure to add page to log bio Brian Foster
2020-03-24 17:18 ` Darrick J. Wong
2020-03-24 17:29 ` Brian Foster
2020-03-24 20:34 ` Darrick J. Wong
2020-03-24 23:24 ` Dave Chinner [this message]
2020-03-25 11:24 ` Brian Foster
2020-03-25 7:12 ` Christoph Hellwig
2020-03-25 11:25 ` Brian Foster
2020-03-25 11:41 ` Christoph Hellwig
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=20200324232424.GC10776@dread.disaster.area \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox