Re: [PATCH v3] ext4: Prevent race while waling extent tree

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

 



> I have prepared a path to fix this and I am going to test this
> right not. Basically it will:
> 
> 1. remove the callback
> 
> 2. rename functions
> 	ext4_ext_walk_space -> ext4_fill_fiemap_extents
> 	ext4_ext_fiemap_cb -> ext4_find_delayed_extent
> 
> 3. put fiemap_fill_next_extent() into ext4_fill_fiemap_extents)_
> 
> 4. Call ext4_find_delayed_extent() only for non existing extents
> 
> 5. Use GFP_NOFS in ext4_find_delayed_extent()
> 
> 5. hold the i_data_sem for:
> 	ext4_ext_find_extent()
> 	ext4_ext_next_allocated_block()
> 	ext4_find_delayed_extent()
> 
> 6. call fiemap_fill_next_extent after releasing the i_data_sem
> 
> does it sounds ok?

That sounds.. good?  I'm no ext* locking expert :).

> ---
> I should probably split that into two parts to make the changes
> clearer, because removing the if (newex->ec_start == 0) in the old
> ext4_ext_fiemap_cb() obfuscated it a lot.

Yeah, definitely.  I found myself squinting looking for code changes in
all the code motion.

- z
--
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