From: Christoph Hellwig <hch@infradead.org>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] btrfs: verify the endio function at layer boundary
Date: Tue, 22 Mar 2022 23:34:20 -0700 [thread overview]
Message-ID: <Yjq/bNLcB6uBU3I2@infradead.org> (raw)
In-Reply-To: <27688f5ed1d59b26255f285843c4573322acfa39.1647926689.git.wqu@suse.com>
So based on my staring at this area for a while I think the fundamental
probem is that btrfs passes a struct bio in a lot of places where it
should pass a btrfs_bio.
Basically all the layers that eventually call into btrfs_map_bio should
all be working on a btrfs_bio. The fact that the btrfs_bio contains
a struct bio is an implementation detail that should be mostly invisible
to the consumers of the btrfs_bio API. That also means the "high level"
end_io callbacks should take a btrfs_bio and we can just use good old
type safety for this sanity check. I have started this work, but as
my bio cleanup series already got big enough I've not finished and
posted it.
next prev parent reply other threads:[~2022-03-23 6:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 5:37 [PATCH RFC] btrfs: verify the endio function at layer boundary Qu Wenruo
2022-03-22 8:23 ` Qu Wenruo
2022-03-23 6:34 ` Christoph Hellwig [this message]
2022-03-23 6:51 ` Qu Wenruo
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=Yjq/bNLcB6uBU3I2@infradead.org \
--to=hch@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.