Hi Alex, Thanks for review! I'll post rebased patch with comments and some ascii art this weekend. > the patch looks fine, the only suggestion is to move the following logic > into mb_buddy_mark_free(): > > + if (first & 1) { > + first += !left_is_free; > + e4b->bd_info->bb_counters[0] += left_is_free ? -1 : 1; > + } > + if (!(last & 1)) { > + last -= !right_is_free; > + e4b->bd_info->bb_counters[0] += right_is_free ? -1 : 1; > + } I didn't do that since buddy[0] is a special case since it is in fact bd_bitmap itself. Moving that into mb_buddy_mark_free will make code look worse because of this special handling. I think unrolling first iteration that handles bd_bitmap looks much better. Regards, Andrey. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html