]> git.karo-electronics.de Git - linux-beck.git/commit
block: add a bi_error field to struct bio
authorChristoph Hellwig <hch@lst.de>
Mon, 20 Jul 2015 13:29:37 +0000 (15:29 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 29 Jul 2015 14:55:15 +0000 (08:55 -0600)
commit4246a0b63bd8f56a1469b12eafeb875b1041a451
tree3281bb158d658ef7f208ad380c0ecee600a5ab5e
parent0034af036554c39eefd14d835a8ec3496ac46712
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>
95 files changed:
Documentation/block/biodoc.txt
arch/m68k/emu/nfblock.c
arch/powerpc/sysdev/axonram.c
arch/xtensa/platforms/iss/simdisk.c
block/bio-integrity.c
block/bio.c
block/blk-core.c
block/blk-lib.c
block/blk-map.c
block/blk-mq.c
block/bounce.c
drivers/block/aoe/aoecmd.c
drivers/block/aoe/aoedev.c
drivers/block/brd.c
drivers/block/drbd/drbd_actlog.c
drivers/block/drbd/drbd_bitmap.c
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_req.c
drivers/block/drbd/drbd_worker.c
drivers/block/floppy.c
drivers/block/null_blk.c
drivers/block/pktcdvd.c
drivers/block/ps3vram.c
drivers/block/rsxx/dev.c
drivers/block/umem.c
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkfront.c
drivers/block/zram/zram_drv.c
drivers/md/bcache/btree.c
drivers/md/bcache/closure.h
drivers/md/bcache/io.c
drivers/md/bcache/journal.c
drivers/md/bcache/movinggc.c
drivers/md/bcache/request.c
drivers/md/bcache/super.c
drivers/md/bcache/writeback.c
drivers/md/dm-bio-prison.c
drivers/md/dm-bufio.c
drivers/md/dm-cache-target.c
drivers/md/dm-crypt.c
drivers/md/dm-flakey.c
drivers/md/dm-io.c
drivers/md/dm-log-writes.c
drivers/md/dm-raid1.c
drivers/md/dm-snap.c
drivers/md/dm-stripe.c
drivers/md/dm-thin.c
drivers/md/dm-verity.c
drivers/md/dm-zero.c
drivers/md/dm.c
drivers/md/faulty.c
drivers/md/linear.c
drivers/md/md.c
drivers/md/multipath.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/nvdimm/blk.c
drivers/nvdimm/btt.c
drivers/nvdimm/pmem.c
drivers/s390/block/dcssblk.c
drivers/s390/block/xpram.c
drivers/target/target_core_iblock.c
drivers/target/target_core_pscsi.c
fs/btrfs/check-integrity.c
fs/btrfs/compression.c
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/raid56.c
fs/btrfs/scrub.c
fs/btrfs/volumes.c
fs/buffer.c
fs/direct-io.c
fs/ext4/page-io.c
fs/ext4/readpage.c
fs/f2fs/data.c
fs/gfs2/lops.c
fs/gfs2/ops_fstype.c
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_metapage.c
fs/logfs/dev_bdev.c
fs/mpage.c
fs/nfs/blocklayout/blocklayout.c
fs/nilfs2/segbuf.c
fs/ocfs2/cluster/heartbeat.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_buf.c
include/linux/bio.h
include/linux/blk_types.h
include/linux/swap.h
kernel/power/swap.c
kernel/trace/blktrace.c
mm/page_io.c