All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Josef Bacik <josef@toxicpanda.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	"kernel-team@fb.com" <kernel-team@fb.com>
Subject: Re: [PATCH 5/8] btrfs: track compressed bio errors as blk_status_t
Date: Wed, 16 Feb 2022 08:53:48 +0000	[thread overview]
Message-ID: <PH0PR04MB7416CEDBD67123015B071A529B359@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20a9dc5bd938c090a6bf0def0e46604c5a94fcab.1644532798.git.josef@toxicpanda.com

On 10/02/2022 23:45, Josef Bacik wrote:
> @@ -372,14 +374,14 @@ static void finish_compressed_bio_write(struct compressed_bio *cb)
>  {
>  	struct inode *inode = cb->inode;
>  	unsigned int index;
> +	int errno = blk_status_to_errno(cb->status);
>  
>  	/*
>  	 * Ok, we're the last bio for this extent, step one is to call back
>  	 * into the FS and do all the end_io operations.
>  	 */
>  	btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), NULL,
> -			cb->start, cb->start + cb->len - 1,
> -			!cb->errors);
> +			cb->start, cb->start + cb->len - 1, errno == 0);

No need for the errno here, it could just be:

	btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), NULL,
			cb->start, cb->start + cb->len - 1,
			cb->status == BLK_STS_OK);

  reply	other threads:[~2022-02-16  8:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 22:44 [PATCH 0/8] Fix error handling on data bio submission Josef Bacik
2022-02-10 22:44 ` [PATCH 1/8] btrfs: make search_csum_tree return 0 if we get -EFBIG Josef Bacik
2022-02-11 22:39   ` Boris Burkov
2022-02-15 16:10   ` Johannes Thumshirn
2022-02-10 22:44 ` [PATCH 2/8] btrfs: handle csum lookup errors properly on reads Josef Bacik
2022-02-11 22:28   ` Boris Burkov
2022-02-10 22:44 ` [PATCH 3/8] btrfs: check correct bio in finish_compressed_bio_read Josef Bacik
2022-02-11 22:43   ` Boris Burkov
2022-02-16  8:48   ` Johannes Thumshirn
2022-02-10 22:44 ` [PATCH 4/8] btrfs: remove the bio argument from finish_compressed_bio_read Josef Bacik
2022-02-16  8:50   ` Johannes Thumshirn
2022-02-10 22:44 ` [PATCH 5/8] btrfs: track compressed bio errors as blk_status_t Josef Bacik
2022-02-16  8:53   ` Johannes Thumshirn [this message]
2022-02-10 22:44 ` [PATCH 6/8] btrfs: do not double complete bio on errors during compressed reads Josef Bacik
2022-02-11 22:54   ` Boris Burkov
2022-02-14 17:06     ` David Sterba
2022-02-10 22:44 ` [PATCH 7/8] btrfs: do not try to repair bio that has no mirror set Josef Bacik
2022-02-11 22:56   ` Boris Burkov
2022-02-10 22:44 ` [PATCH 8/8] btrfs: do not clean up repair bio if submit fails Josef Bacik
2022-02-11 23:00   ` Boris Burkov

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=PH0PR04MB7416CEDBD67123015B071A529B359@PH0PR04MB7416.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.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.