Re: [PATCH 1/2] xfs: force writes to delalloc regions to unwritten

Darrick J. Wong
2020-01-16T23:16:13Z

On Thu, Jan 16, 2020 at 08:47:41AM -0800, Christoph Hellwig wrote:
> On Wed, Jan 15, 2020 at 10:15:50PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > When writing to a delalloc region in the data fork, commit the new
> > allocations (of the da reservation) as unwritten so that the mappings
> > are only marked written once writeback completes successfully. This
> > fixes the problem of stale data exposure if the system goes down during
> > targeted writeback of a specific region of a file, as tested by
> > generic/042.
>
> I think this is the only safe way to deal with buffered I/O into
> holes, so:

Ditto. Thanks for reviewing things!

--D

> Reviewed-by: Christoph Hellwig <hch@lst.de>