Re: [PATCH 2/3] xfs: rework insert range into an atomic operation

Darrick J. Wong
2019-12-24T16:47:40Z

On Tue, Dec 24, 2019 at 03:28:45AM -0800, Christoph Hellwig wrote:
> On Fri, Dec 20, 2019 at 12:17:17PM -0800, Darrick J. Wong wrote:
> > I think directio completions might suffer from the same class of problem
> > though, since we allow concurrent dio writes and dio doesn't do any of
> > the ioend batching that we do with buffered write ioends.
>
> OTOH direct I/O completions are per-I/O, and not per-extent like
> buffered I/O completions. Moreover for the case where we don't update
> i_size and don't need a separate log force (overwrites without O_SYNC
> or using fua) we could actually avoid the workqueue entirely with just
> a little work.

<nod>

> > It might also be nice to find a way to unify the ioend paths since they
> > both do "convert unwritten and do cow remapping" on the entire range,
> > and diverge only once that's done.
>
> They were common a while ago and it was a complete mess. That is why
> I split them.

And I couldn't figure out a sane way to make them work together so I
guess it's just as well. :)

--D