From: Christoph Hellwig <hch@infradead.org>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 02/12] btrfs: introduce a new helper to submit bio for scrub
Date: Wed, 15 Mar 2023 00:54:23 -0700 [thread overview]
Message-ID: <ZBF5r3itXwDKCsA8@infradead.org> (raw)
In-Reply-To: <27af1ebdc7a7048895be3eaccd3fb437337e1830.1678777941.git.wqu@suse.com>
> + * @inode can be NULL for callers who don't want any advanced features
> + * like read-time repair.
> + * In that case, @fs_info must be properly initialized.
> + */
> struct btrfs_inode *inode;
> - u64 file_offset;
> +
> + union {
> + /* If @inode is initialized. */
> + u64 file_offset;
> +
> + /* If @inode is NULL. */
> + struct btrfs_fs_info *fs_info;
> + };
Ugg. Let's not go into too crazy unions here that make the code
alsmost impossible to use correctly. If we want to get away without
the inode we just need an extra unconditional fs_info field, which
is what most users of ->inode actually use. I can take care of that.
next prev parent reply other threads:[~2023-03-15 7:54 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 7:34 [PATCH v2 00/12] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror() Qu Wenruo
2023-03-14 7:34 ` [PATCH v2 01/12] btrfs: scrub: use dedicated super block verification function to scrub one super block Qu Wenruo
2023-03-14 12:05 ` Johannes Thumshirn
2023-03-14 18:20 ` David Sterba
2023-03-14 22:28 ` Qu Wenruo
2023-03-14 7:34 ` [PATCH v2 02/12] btrfs: introduce a new helper to submit bio for scrub Qu Wenruo
2023-03-15 7:54 ` Christoph Hellwig [this message]
2023-03-15 8:04 ` Qu Wenruo
2023-03-15 8:07 ` Christoph Hellwig
2023-03-15 8:12 ` Qu Wenruo
2023-03-14 7:34 ` [PATCH v2 03/12] btrfs: introduce a new helper to submit write " Qu Wenruo
2023-03-14 7:34 ` [PATCH v2 04/12] btrfs: scrub: introduce the structure for new BTRFS_STRIPE_LEN based interface Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 05/12] btrfs: scrub: introduce a helper to find and fill the sector info for a scrub_stripe Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 06/12] btrfs: scrub: introduce a helper to verify one metadata Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 07/12] btrfs: scrub: introduce a helper to verify one scrub_stripe Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 08/12] btrfs: scrub: introduce the main read repair worker for scrub_stripe Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 09/12] btrfs: scrub: introduce a writeback helper " Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 10/12] btrfs: scrub: introduce error reporting functionality " Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 11/12] btrfs: scrub: introduce the helper to queue a stripe for scrub Qu Wenruo
2023-03-14 7:35 ` [PATCH v2 12/12] btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure Qu Wenruo
2023-03-14 10:58 ` [PATCH v2 00/12] btrfs: scrub: use a more reader friendly code to implement scrub_simple_mirror() Johannes Thumshirn
2023-03-14 11:06 ` Qu Wenruo
2023-03-14 11:10 ` Johannes Thumshirn
2023-03-14 11:18 ` Qu Wenruo
2023-03-14 18:48 ` David Sterba
2023-03-14 22:42 ` Qu Wenruo
2023-03-15 7:52 ` Christoph Hellwig
2023-03-15 8:11 ` Qu Wenruo
2023-03-28 9:34 ` Qu Wenruo
2023-03-28 23:37 ` Christoph Hellwig
2023-03-28 23:44 ` Qu Wenruo
2023-03-28 23:50 ` 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=ZBF5r3itXwDKCsA8@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox