On Mon 21-10-19 20:18:56, Matthew Bobrowski wrote: > In preparation for implementing the iomap direct I/O modifications, > the inode extension/truncate code needs to be moved out from the > ext4_iomap_end() callback. For direct I/O, if the current code > remained, it would behave incorrrectly. Updating the inode size prior > to converting unwritten extents would potentially allow a racing > direct I/O read to find unwritten extents before being converted > correctly. > > The inode extension/truncate code now resides within a new helper > ext4_handle_inode_extension(). This function has been designed so that > it can accommodate for both DAX and direct I/O extension/truncate > operations. > > Signed-off-by: Matthew Bobrowski <mbobrowski@xxxxxxxxxxxxxx> > --- > fs/ext4/file.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++- > fs/ext4/inode.c | 48 +-------------------------------- > 2 files changed, 71 insertions(+), 48 deletions(-) > The patch looks good to me. You can add: Reviewed-by: Jan Kara <jack@xxxxxxx> One nit below: > +static ssize_t ext4_handle_inode_extension(struct inode *inode, ssize_t written, > + loff_t offset, size_t count) IMHO a bit more logical ordering of arguments would be 'inode, offset, written, count'... Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR