On Thu, Feb 21, 2008 at 09:39:20AM -0800, Mingming Cao wrote: > On Tue, 2008-02-19 at 09:13 +0530, Aneesh Kumar K.V wrote: > > We would like to get notified when we are doing a write on mmap section. > > This is needed with respect to preallocated area. We split the preallocated > > area into initialzed extent and uninitialzed extent in the call back. This > > let us handle ENOSPC better. Otherwise we get ENOSPC in the writepage and > > that would result in data loss. The changes are also needed to handle ENOSPC > > when writing to an mmap section of files with holes. > > > > Hi Aneesh, > > I have a concern, it seems we missed journalling the allocation activity > for the mmaped write. See comments below... > > Another thing, perhaps similar patch should be ported to ext2/3, as this > also addressed the mmaped write ENOSPC error without > preallocation/deleyed allocation. > > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> ...... > > + > > +int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page) > > +{ > > + return block_page_mkwrite(vma, page, ext4_get_block); > > +} > > + > > I don't see block allocation being journalled here. block_page_mkwrite() > eventually calling block_prepare_write() which invokes ext4_get_block() > without starting a new journal handle. > > Perhaps call ext4 write_begin() and write_end() inode operations, that > would taking care of different write_begin and write_end for three > different journalling mode. > You are correct. I missed the journalling details when working on the patch. Will send the one with fix. -aneesh - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html