g_duplicate_bio() was introduced in base r159304: > Add g_duplicate_bio() function which does the same thing what g_clone_bio() > is doing, but g_duplicate_bio() allocates new bio with M_WAITOK flag. Originally it was almost a complete duplicate (or a clone) of g_bio_clone except for the M_NOWAIT vs M_MWAITOK difference. But over the time some additional differences have accumulated. Among them handling of bio_flags and geom schedulers. It is very hard to tell which differences are intentional and which are not. It would be nice to identify and remove the unintentional differences. Also, it would be nice to move the common code into a helper function to avoid the code duplication and the resulting unintentional divergence. Finally, perhaps g_duplicate_bio() needs a better name while it is not very widely used. "Duplicate" and "clone" are synonyms, so it's hard telling them apart. Some ideas: g_bio_reliable_clone, g_bio_clone_waitok.