On Fri, Dec 12, 2008 at 12:59:22PM -0500, Theodore Tso wrote: > On Wed, Dec 10, 2008 at 06:37:43PM +0530, Aneesh Kumar K.V wrote: > > We can call ext4_mb_check_limits even after successfull > > allocation. Make sure we don't overwrite ac_status. > > This fix the below lockdep warning > > So the ext4_mb_check_limits() function isn't that well documented, but > one of the things it is supposed to do is to make sure that blocks > comprising the extent that was found is in fact still available. This > check patches this out. Are we sure this does the right thing? ext4_mb_check_limits does allocation in complex_scan. In complex scan we loop through available free blocks and try to find the best extent. We also want to make sure we doesn't loop too much. So ext4_mb_check_limits and ext4_mb_measure_extent does multiple things. Now what we do in complex_scan is for blocks in group: ext4_mb_find_extent(); ext4_mb_measure_extents() ext4_mb_check_limits(..., 1); Now ext4_mb_measure_extents() can result in successfull allocation. So we need to make sure we don't do further allocation in ext4_mb_check_limits when we call ext4_mb_check_limits later with finish_group = 1; -aneesh -- 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