summaryrefslogtreecommitdiff
path: root/scripts/bin2c.c
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2006-12-10 13:20:59 +0300
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-10 20:57:21 +0300
commit0273201e693fd62381f6b1e85b15ffc117d8a46e (patch)
tree2dff76f33cbcaf7b7d88187da122d7aa98268b11 /scripts/bin2c.c
parent17a7b1d74b1207f8f1af40b5d184989076d08f8b (diff)
downloadlinux-0273201e693fd62381f6b1e85b15ffc117d8a46e.tar.xz
[PATCH] dio: formalize bio counters as a dio reference count
Previously we had two confusing counts of bio progress. 'bio_count' was decremented as bios were processed and freed by the dio core. It was used to indicate final completion of the dio operation. 'bios_in_flight' reflected how many bios were between submit_bio() and bio->end_io. It was used by the sync path to decide when to wake up and finish completing bios and was ignored by the async path. This patch collapses the two notions into one notion of a dio reference count. bios hold a dio reference when they're between submit_bio and bio->end_io. Since bios_in_flight was only used in the sync path it is now equivalent to dio->refcount - 1 which accounts for direct_io_worker() holding a reference for the duration of the operation. dio_bio_complete() -> finished_one_bio() was called from the sync path after finding bios on the list that the bio->end_io function had deposited. finished_one_bio() can not drop the dio reference on behalf of these bios now because bio->end_io already has. The is_async test in finished_one_bio() meant that it never actually did anything other than drop the bio_count for sync callers. So we remove its refcount decrement, don't call it from dio_bio_complete(), and hoist its call up into the async dio_bio_complete() caller after an explicit refcount decrement. It is renamed dio_complete_aio() to reflect the remaining work it actually does. Signed-off-by: Zach Brown <zach.brown@oracle.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Cc: Suparna Bhattacharya <suparna@in.ibm.com> Acked-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts/bin2c.c')
0 files changed, 0 insertions, 0 deletions