On Tue, Oct 08, 2019 at 01:25:12PM +0200, Jan Kara wrote: > On Thu 03-10-19 21:34:18, Matthew Bobrowski wrote: > Looks good to me. Fell free to add: > > Reviewed-by: Jan Kara <jack@xxxxxxx> Thanks Jan! > Just small nits below: > > > +static int ext4_handle_inode_extension(struct inode *inode, loff_t offset, > > + ssize_t written, size_t count) > > +{ > > + int ret = 0; > > I think both the function and callsites may be slightly simpler if you let > the function return 'written' or error (not 0 or error). But I'll leave > that decision upto you. Hm, don't we actually need to return 0 for success cases so that iomap_dio_complete() behaves correctly i.e. increments iocb->ki_pos, etc? > > + handle_t *handle; > > + bool truncate = false; > > + u8 blkbits = inode->i_blkbits; > > + ext4_lblk_t written_blk, end_blk; > > + > > + /* > > + * Note that EXT4_I(inode)->i_disksize can get extended up to > > + * inode->i_size while the IO was running due to writeback of > > + * delalloc blocks. But the code in ext4_iomap_alloc() is careful > > + * to use zeroed / unwritten extents if this is possible and thus > > + * we won't leave uninitialized blocks in a file even if we didn't > > + * succeed in writing as much as we planned. > > + */ > > Whitespace damaged here... I'll fix this. --<M>--