Thread (117 messages) 117 messages, 8 authors, 2021-05-30

Re: [Patch v2 07/42] btrfs: pass btrfs_inode into btrfs_writepage_endio_finish_ordered()

From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-05-23 14:08:29

On 5/23/21 9:50 AM, Qu Wenruo wrote:

On 2021/5/23 下午9:43, Josef Bacik wrote:
quoted
On 5/23/21 3:40 AM, Qu Wenruo wrote:
quoted

On 2021/5/22 上午8:24, Qu Wenruo wrote:
quoted

On 2021/5/21 下午10:27, Josef Bacik wrote:
quoted
On 4/27/21 7:03 PM, Qu Wenruo wrote:
quoted
There is a pretty bad abuse of
btrfs_writepage_endio_finish_ordered() in
end_compressed_bio_write().

It passes compressed pages to btrfs_writepage_endio_finish_ordered(),
which is only supposed to accept inode pages.

Thankfully the important info here is the inode, so let's pass
btrfs_inode directly into btrfs_writepage_endio_finish_ordered(), and
make @page parameter optional.

By this, end_compressed_bio_write() can happily pass page=NULL while
still get everything done properly.

Also, to cooperate with such modification, replace @page parameter for
trace_btrfs_writepage_end_io_hook() with btrfs_inode.
Although this removes page_index info, the existing start/len
should be
enough for most usage.

Signed-off-by: Qu Wenruo <redacted>
This was merged into misc-next yesterday it looks like, and it's caused
both of my VM's that do compression variations to panic on different
tests, one on btrfs/011 and one on btrfs/027.  I bisected it to this
patch, I'm not sure what's wrong with it but it needs to be dropped
from
misc-next until it gets fixed otherwise it'll keep killing the
overnight
xfstests runs.  Thanks,
Any dying message to share?

I just tried with "-o compress" mount option for btrfs/011 and
btrfs/027, none of them crashed on my local branch (full subpage RW
branch).
A full day passed, and still no reproduce.

And this patch really doesn't change anything for the involved
compressed write path.

And considering it's the BUG_ON() triggered inside btrfs_map_bio(), it
means we have some bio crossed stripe boundary.
It may be related to device size as that may change the on-disk data
layout.

Mind to shared the full fstests config and disk layout?
Just 10gib slice of a LV with -o compress.  Though I got panics last
night and I think Dave pulled your patches, so maybe bisect lied to me.
I'm going to re-run again to see what pops.  THanks,
And if possible, please re-run the branch of ext/qu/subpage-prep-13
(commit 42793356463a9674f45118125304fd92c4679c27), which folded one
known fix in patch
"btrfs: refactor submit_extent_page() to make bio and its flag tracing
easier".

Really hope it's not a bug in the subpage preparation patchset.
Yeah it's not you, IDK what happened with my previous bisect, it ended up being

btrfs: zoned: fix parallel compressed writes

Sorry for the confusion,

Josef
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help