On Thu, Apr 26, 2018 at 4:01 AM, David Sterba <dste...@suse.cz> wrote: > On Wed, Apr 25, 2018 at 09:40:34AM +0800, Liu Bo wrote: >> path->keep_lock is set but @path immediatley gets released, this sets >> ->keep_lock only when it's necessary. > > Can you please write down more details for context? This mostly repeats > what the code does, but not why. Thanks.
Urr, right, I missed the important piece. ->keep_lock may hold the locks of all nodes on the path instead of only level=1 node and level=0 leaf. As it's more likely that lock content happens on tree root and higher nodes, we have to release as less locks as possible. Will update in v2. thanks, liubo > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html