[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121115191041.GB27207@lenny.home.zabbo.net>
Date: Thu, 15 Nov 2012 11:10:41 -0800
From: Zach Brown <zab@...hat.com>
To: Lukáš Czerner <lczerner@...hat.com>
Cc: Peng Tao <bergwolf@...il.com>, linux-ext4@...r.kernel.org,
tytso@....edu, dmonakhov@...nvz.org
Subject: Re: [PATCH v3] ext4: Prevent race while waling extent tree
> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists