Re: [PATCH] ext4: Don't overwrite allocation_context ac_status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux