public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Boris Burkov <boris@bur.io>
Cc: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 6/8] btrfs: do not double complete bio on errors during compressed reads
Date: Mon, 14 Feb 2022 18:06:07 +0100	[thread overview]
Message-ID: <20220214170607.GH12643@twin.jikos.cz> (raw)
In-Reply-To: <YgbpHjBvf49gtEbC@zen>

On Fri, Feb 11, 2022 at 02:54:22PM -0800, Boris Burkov wrote:
> > @@ -821,9 +821,12 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
> >  	read_lock(&em_tree->lock);
> >  	em = lookup_extent_mapping(em_tree, file_offset, fs_info->sectorsize);
> >  	read_unlock(&em_tree->lock);
> > -	if (!em)
> > -		return BLK_STS_IOERR;
> > +	if (!em) {
> > +		ret = BLK_STS_IOERR;
> > +		goto out;
> > +	}
> >  
> > +	ret = BLK_STS_RESOURCE;
> 
> I think the error handling logic with all the special exit paths makes
> it worthwhile to set ret at each individual 'goto failX'.

Yeah, this is IMHO more clear which error is returned from the error
branches than some random value set before.

  reply	other threads:[~2022-02-14 17:09 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
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 [this message]
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=20220214170607.GH12643@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=boris@bur.io \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox