Replace the bio_chain concept with:(1) simple atomic_t recording how many pages are in flight(2) a wait queue for waiting for all I/O to complete(3) a custom completion routine that frees bio structs and pages used for async writes as they complete, undates the atomic_t and wakes any waiters.