All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Christoph Hellwig <hch@lst.de>, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 10/21] btrfs: add a is_data_bio helper
Date: Tue, 9 May 2023 00:00:15 +0000	[thread overview]
Message-ID: <fd8a6f1b-12e2-3d92-29aa-32333c7ac59b@wdc.com> (raw)
In-Reply-To: <20230508160843.133013-11-hch@lst.de>

On 08.05.23 18:09, Christoph Hellwig wrote:
> Add a helper to check for that a btrfs_bio has a valid inde inode, and
> that it is a data inode to key off all the special handling for data
> path checksumming.  Note that this uses is_data_inode instead of REQ_META
> as REQ_META is only set directly before submission in submit_one_bio
> and we'll also want to use this helper for error handling where REQ_META
> isn't set yet.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/btrfs/bio.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
> index 5f418eeaac070b..c38d3597169b5e 100644
> --- a/fs/btrfs/bio.c
> +++ b/fs/btrfs/bio.c
> @@ -27,6 +27,12 @@ struct btrfs_failed_bio {
>  	atomic_t repair_count;
>  };
>  
> +/* Is this a data path I/O that needs storage layer checksum and repair? */
> +static inline bool is_data_bio(struct btrfs_bio *bbio)
> +{
> +	return bbio->inode && is_data_inode(&bbio->inode->vfs_inode);
> +}
> +

is_data_bbio() please. Otherwise fine with me.


  reply	other threads:[~2023-05-09  0:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 16:08 add an ordered_extent pointer to struct btrfs_bio Christoph Hellwig
2023-05-08 16:08 ` [PATCH 01/21] btrfs: don't BUG_ON on allocation failure in btrfs_csum_one_bio Christoph Hellwig
2023-05-08 16:08 ` [PATCH 02/21] btrfs: fix file_offset for REQ_BTRFS_ONE_ORDERED bios that get split Christoph Hellwig
2023-05-08 22:17   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 03/21] btrfs: limit write bios to a single ordered extent Christoph Hellwig
2023-05-08 22:40   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 04/21] btrfs: merge the two calls to btrfs_add_ordered_extent in run_delalloc_nocow Christoph Hellwig
2023-05-08 16:08 ` [PATCH 05/21] btrfs: pass an ordered_extent to btrfs_reloc_clone_csums Christoph Hellwig
2023-05-08 23:30   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 06/21] btrfs: pass an ordered_extent to btrfs_submit_compressed_write Christoph Hellwig
2023-05-08 23:39   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 07/21] btrfs: reorder btrfs_extract_ordered_extent Christoph Hellwig
2023-05-08 23:45   ` Johannes Thumshirn
2023-05-09  0:04   ` Naohiro Aota
2023-05-08 16:08 ` [PATCH 08/21] btrfs: return the new ordered_extent from btrfs_split_ordered_extent Christoph Hellwig
2023-05-08 23:51   ` Johannes Thumshirn
2023-05-09  0:11   ` Naohiro Aota
2023-05-08 16:08 ` [PATCH 09/21] btrfs: remove btrfs_add_ordered_extent Christoph Hellwig
2023-05-08 23:55   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 10/21] btrfs: add a is_data_bio helper Christoph Hellwig
2023-05-09  0:00   ` Johannes Thumshirn [this message]
2023-05-08 16:08 ` [PATCH 11/21] btrfs: open code btrfs_bio_end_io in btrfs_dio_submit_io Christoph Hellwig
2023-05-09  0:03   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 12/21] btrfs: add an ordered_extent pointer to struct btrfs_bio Christoph Hellwig
2023-05-09  0:12   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 13/21] btrfs: use bbio->ordered in btrfs_csum_one_bio Christoph Hellwig
2023-05-09  0:14   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 14/21] btrfs: use bbio->ordered for zone append completions Christoph Hellwig
2023-05-09  0:16   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 15/21] btrfs: factor out a can_finish_ordered_extent helper Christoph Hellwig
2023-05-09  0:17   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 16/21] btrfs: factor out a btrfs_queue_ordered_fn helper Christoph Hellwig
2023-05-09  0:19   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 17/21] btrfs: add a btrfs_finish_ordered_extent helper Christoph Hellwig
2023-05-09  0:22   ` Johannes Thumshirn
2023-05-09 13:12     ` Christoph Hellwig
2023-05-10 13:16       ` David Sterba
2023-05-08 16:08 ` [PATCH 18/21] btrfs: use btrfs_finish_ordered_extent to complete compressed writes Christoph Hellwig
2023-05-09 15:48   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 19/21] btrfs: use btrfs_finish_ordered_extent to complete direct writes Christoph Hellwig
2023-05-09 15:50   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 20/21] btrfs: open code end_extent_writepage in end_bio_extent_writepage Christoph Hellwig
2023-05-09 15:55   ` Johannes Thumshirn
2023-05-08 16:08 ` [PATCH 21/21] btrfs: use btrfs_finish_ordered_extent to complete buffered writes Christoph Hellwig
2023-05-09 15:56   ` Johannes Thumshirn
2023-05-10 16:32 ` add an ordered_extent pointer to struct btrfs_bio David Sterba
2023-05-11 17:56   ` David Sterba
2023-05-12 13:32     ` Christoph Hellwig
2023-05-15  6:40 ` Christoph Hellwig
2023-05-15 11:12   ` David Sterba

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=fd8a6f1b-12e2-3d92-29aa-32333c7ac59b@wdc.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@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 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.