On Mon 14-03-16 14:51:26, Wilcox, Matthew R wrote: > I think the ultimate goal here has to be to have the truncate code lock > the DAX entry in the radix tree and delete it. Then we can have > do_cow_fault() unlock the radix tree entry instead of the i_mmap_lock. > So we'll need another element in struct vm_fault where we can pass back a > pointer into the radix tree instead of a pointer to struct page (or add > another bit to VM_FAULT_ that indicates that 'page' is not actually a > page, but a pointer to an exceptional entry ... or have the MM code > understand the exceptional bit ... there's a few ways we can go here). Yes, with my last patch truncate already waits for lock in radix tree. And I was looking into various ways how to cleanly handle cow faults using the radix tree lock instead of i_mmap_lock. So far it's a bit hacky to my taste but I agree we want to fix the race that way. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html