From: Matthew Wilcox <willy@infradead.org>
To: "Dāvis Mosāns" <davispuh@gmail.com>
Cc: BTRFS <linux-btrfs@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, kernelnewbies@kernelnewbies.org
Subject: Re: How to debug stuck read?
Date: Wed, 2 Feb 2022 19:13:24 +0000 [thread overview]
Message-ID: <YfrX1BVIlIwiVYzs@casper.infradead.org> (raw)
In-Reply-To: <CAOE4rSwfTEaJ_O9Bv1CkLRnLWYoZ7NSS=5pzuQz4mUBE-PXQ5A@mail.gmail.com>
On Wed, Feb 02, 2022 at 07:15:14PM +0200, Dāvis Mosāns wrote:
> I have a corrupted file on BTRFS which has CoW disabled thus no
> checksum. Trying to read this file causes the process to get stuck
> forever. It doesn't return EIO.
>
> How can I find out why it gets stuck?
> $ cat /proc/3449/stack | ./scripts/decode_stacktrace.sh vmlinux
> folio_wait_bit_common (mm/filemap.c:1314)
> filemap_get_pages (mm/filemap.c:2622)
> filemap_read (mm/filemap.c:2676)
> new_sync_read (fs/read_write.c:401 (discriminator 1))
folio_wait_bit_common() is where it waits for the page to be unlocked.
Probably the problem is that btrfs isn't unlocking the page on
seeing the error, so you don't get the -EIO returned?
next prev parent reply other threads:[~2022-02-02 19:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 17:15 How to debug stuck read? Dāvis Mosāns
2022-02-02 19:13 ` Matthew Wilcox [this message]
2022-02-02 21:50 ` Dāvis Mosāns
2022-02-06 11:01 ` FMDF
2022-02-06 12:48 ` Matthew Wilcox
2022-02-06 21:22 ` FMDF
2022-02-06 23:21 ` Dāvis Mosāns
2022-02-06 23:49 ` Matthew Wilcox
2022-02-07 0:07 ` Dāvis Mosāns
2022-02-07 1:06 ` Matthew Wilcox
2022-02-07 1:22 ` Dāvis Mosāns
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=YfrX1BVIlIwiVYzs@casper.infradead.org \
--to=willy@infradead.org \
--cc=davispuh@gmail.com \
--cc=kernelnewbies@kernelnewbies.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).