>> Also move the function before locking extent state. > > Hmm, any reason? i_mutex protects us from a racing write(2), but what > about a racing mmap()? e.g. > > cloner: truncates dest pages > writer: mmap -> page_mkwrite locks extent, creates new dirty page, unlocks > cloner: locks extent, clones, unlocks extent > (besides Chris' comments) How can we avoid the race on dst file by locking src file extent state.. -- Li Zefan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
