Hello, after debugging more the reason why fsmark run is slower in dioread_nolock mode (which became the default in 5.6), I've found jbd2 actually leaks reserved credits if we start a transaction with reserved handle and then don't use it. The first patch in the series is a small (and independent) cleanup in the area, the second patch fixes the leak. Then there was another revelation for me that in this workload ext4 actually starts lots of reserved transaction handles that are unused. This is due to the way how ext4 writepages code works - it starts a transaction, then inspects page cache and writes one extent if found. Then starts again a transaction and checks whether there's more to write. So for single extent files we always start transaction twice, second time only to find there's nothing more to write. In case all blocks are already allocated, we wouldn't even have to start transaction at all. This probably also deserves to be fixed but a simple fix I made seems to break page writeback so I need to dig more into it and I want to push out the obvious jbd2 fix early. Changes since v1: * Add reviewed-by tag * Fixed up one coding style issue pointed out by Andreas Honza