On Mon, Mar 12, 2012 at 09:15:14PM +0200, Sami Liedes wrote: > In the case of ext2fs_new_inode(), the function does not actually > iterate through all zero bits; it really only wants to find the first > zero in a certain range, after which it returns. So for simplicity of > use (and efficiency) I think it still makes sense to have > ->find_first_zero() too. I agree, a find_first_zero() and a find_first_set(), both of which taking a starting bit position for the search, and the best low-level primitives that would be implemented on for each backend bitmap implementation. It would then be very easy to build iterators on *top* of find_first_zero() and find_first_set(), and in fact this could be used to replace some of the places where we are using a sorted list (i.e., the badblocks list). So that sounds like a good idea, and I can definitely think of some places where we could use that code today. So I plan to pull in your patch series and then we can further enhance this with iterator support afterwards. Sami, if you'd be interested in implementing iterators, that would be great! Thanks, - Ted -- 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