linux_dsm_epyc7002/block
Tejun Heo f4b09303d0 [BLOCK] drop unnecessary bvec rewinding from flush_dry_bio_endio
Barrier bios are completed twice - once after the barrier write itself
is done and again after the whole sequence is complete.
flush_dry_bio_endio() is for the first completion.  It doesn't really
complete the bio.  It rewinds bvec and resets bio so that it can be
completed again when the whole barrier sequence is complete.

The bvec rewinding code has the following problems.

1. The rewinding code is wrong because filesystems may pass bvec with
   non zero bv_offset.

2. The block layer doesn't guarantee anything about the state of
   bvec array on request completion.  bv_offset and len are updated
   iff __end_that_request_first() completes the bvec partially.

Because of #2, #1 doesn't really matter (nobody cares whether bvec is
re-wound correctly or not) but then again by not doing unwinding at
all, we'll always give back the same bvec to the caller as full bvec
completion doesn't alter bvecs and the final completion is always full
completion.

Drop unnecessary rewinding code.

This is spotted by Neil Brown.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-07-10 08:03:33 +02:00
..
as-iosched.c kblockd: use flush_work 2007-05-09 12:30:51 -07:00
blktrace.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
cfq-iosched.c KMEM_CACHE(): simplify slab cache creation 2007-05-07 12:12:55 -07:00
deadline-iosched.c [BLOCK] Cleanup unused variable passing 2006-12-01 10:42:33 +01:00
elevator.c [PATCH] elevator: elv_list_lock does not need irq disabling 2007-04-30 09:08:17 +02:00
genhd.c genhd: send async notification on media change 2007-05-23 20:14:12 -07:00
ioctl.c mm: remove destroy_dirty_buffers from invalidate_bdev() 2007-05-07 12:12:55 -07:00
Kconfig [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
Kconfig.iosched update I/O sched Kconfig help texts - CFQ is now default, not AS. 2007-02-17 20:08:22 +01:00
ll_rw_blk.c [BLOCK] drop unnecessary bvec rewinding from flush_dry_bio_endio 2007-07-10 08:03:33 +02:00
Makefile [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
noop-iosched.c [BLOCK] Cleanup unused variable passing 2006-12-01 10:42:33 +01:00
scsi_ioctl.c [SCSI] sg: cap reserved_size values at max_sectors 2007-04-17 18:09:56 -04:00