All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: device-mapper development <dm-devel@redhat.com>,
	Jens Axboe <axboe@kernel.dk>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	Liu Bo <bo.li.liu@oracle.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [dm-devel] [PATCH] block: add a bi_error field to struct bio
Date: Tue, 21 Jul 2015 10:19:08 +0200	[thread overview]
Message-ID: <55AE007C.9030807@suse.de> (raw)
In-Reply-To: <1437398977-8492-2-git-send-email-hch@lst.de>

On 07/20/2015 03:29 PM, Christoph Hellwig wrote:
> Currently we have two different ways to signal an I/O error on a BIO:
> 
>  (1) by clearing the BIO_UPTODATE flag
>  (2) by returning a Linux errno value to the bi_end_io callback
> 
> The first one has the drawback of only communicating a single possible
> error (-EIO), and the second one has the drawback of not beeing persistent
> when bios are queued up, and are not passed along from child to parent
> bio in the ever more popular chaining scenario.  Having both mechanisms
> available has the additional drawback of utterly confusing driver authors
> and introducing bugs where various I/O submitters only deal with one of
> them, and the others have to add boilerplate code to deal with both kinds
> of error returns.
> 
> So add a new bi_error field to store an errno value directly in struct
> bio and remove the existing mechanisms to clean all this up.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Very good improvement.

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2015-07-21  8:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 13:29 add a bi_error field to struct bio V3 Christoph Hellwig
2015-07-20 13:29 ` [PATCH] block: add a bi_error field to struct bio Christoph Hellwig
2015-07-21  8:19   ` Hannes Reinecke [this message]
2015-07-22  5:00   ` NeilBrown
2015-07-22 18:51   ` Jens Axboe
2015-07-22 21:59     ` Jens Axboe
2015-07-24 10:49       ` Christoph Hellwig
2015-07-24 16:36         ` Jens Axboe
2015-07-28 11:12           ` Christoph Hellwig
2015-07-28 14:33             ` Jens Axboe
2015-07-29  2:15   ` Liu Bo
  -- strict thread matches above, loose matches on Subject: below --
2015-06-03 13:42 [RFC] add a bi_error field Christoph Hellwig
2015-06-03 13:42 ` [PATCH] block: add a bi_error field to struct bio Christoph Hellwig
2015-06-04  9:53   ` [dm-devel] " Martin K. Petersen
2015-06-10  2:50   ` Neil Brown
2015-06-10  8:45     ` 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=55AE007C.9030807@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=bo.li.liu@oracle.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=martin.petersen@oracle.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.