Skip to contentSkip to conversation

ext4: handle unwritten or delalloc buffers before enabling per-file data journaling

PATCH Daeho Jeong 1 participant 1 message Dec 1, 2015

lore
Share & tools
lore
#0 lore raw

Thank you, Jan.

Quoted 10 lines

Can we maybe rephrase the whole comment like:

/*
* Before flushing the journal and switching inode's aops, we have
* to flush all dirty data the inode has. There can be outstanding
* delayed allocations, there can be unwritten extents created by
* fallocate or buffered writes in dioread_nolock mode covered by
* dirty data which can be converted only after flushing the dirty
* data (and journalled aops don't know how to handle these cases). */

Your comment is more understandable, so I will change the comment in the patch.

Quoted 5 lines

BTW, the code is still racy wrt mmap write faults. Once Ted merges my patches for hole punching races, we need to grab i_mmap_sem for writing here as well to avoid write page fault from creating dirty page while we are switching aops... I'm mostly writing this here so that there's lower chance this gets lost.

Ok. I've recognized another racy condition when switching aops of an inode. I will also consider the point in v2 of this patch.