Re: [PATCH v5 1/5] iomap: add iomap_dio_end_io() helper

From: Christoph Hellwig

Date: Wed Nov 25 2026 - 00:46:38 EST


On Mon, Nov 23, 2026 at 02:25:52PM -0800, Viacheslav Dubeyko wrote:
> On Fri, 2026-11-20 at 19:21 +0100, Christoph Hellwig wrote:
> > On Fri, Nov 20, 2026 at 02:48:09PM +0100, Christian Brauner wrote:
> > > On Tue, Nov 17, 2026 at 04:48:40PM -0800, Viacheslav Dubeyko wrote:
> > > > The helper updates i_size without any locking, so it can be used
> > > > only
> > > > by file systems that issue all direct writes extending i_size
> > > > synchronously (IOMAP_DIO_FORCE_WAIT) under inode_lock.
> > >
> > > Meh, this should really not be named so it looks like its the
> > > default
> > > completion handler. iomap_dio_end_io() really sounds like it.
> >
> > Well, it actually should be the default handler as it does the right
> > thing for simple file systems.  In fact I'd prefer to automatically
> > call it if no ->end_io is set as that would remove a lot of
> > boilerplate.
> >
> > It would be nice to do that and remove the duplicate version in
> > various
> > file systems.
>
> So, what's the final consensus on the function name? :) How should I
> name it?

iomap_dio_write_end_io can call it directly from iomap_dio_complete
for writes that don't have a ->end_io caller.