1
0
Fork 0
alistair23-linux/drivers/nvdimm
Christoph Hellwig 4246a0b63b block: add a bi_error field to struct bio
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>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-07-29 08:55:15 -06:00
..
Kconfig libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
Makefile libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
blk.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
btt.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
btt.h libnvdimm, blk: add support for blk integrity 2015-06-26 11:23:38 -04:00
btt_devs.c libnvdimm: Add sysfs numa_node to NVDIMM devices 2015-06-26 11:23:38 -04:00
bus.c nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails 2015-06-30 14:30:34 -04:00
core.c libnvdimm: enable iostat 2015-06-26 11:23:38 -04:00
dimm.c libnvdimm: pmem label sets and namespace instantiation. 2015-06-24 21:24:10 -04:00
dimm_devs.c libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
label.c libnvdimm: infrastructure for btt devices 2015-06-25 04:20:04 -04:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
namespace_devs.c libnvdimm: Add sysfs numa_node to NVDIMM devices 2015-06-26 11:23:38 -04:00
nd-core.h libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
nd.h libnvdimm: Set numa_node to NVDIMM devices 2015-06-26 11:23:38 -04:00
pmem.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
region.c libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory 2015-06-26 11:23:38 -04:00
region_devs.c libnvdimm: Set numa_node to NVDIMM devices 2015-06-26 11:23:38 -04:00