]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: force writes to delalloc regions to unwritten
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 10 Aug 2020 20:32:06 +0000 (16:32 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 10 Aug 2020 20:32:06 +0000 (16:32 -0400)
commitedc9bb69e7ca0ebf836ef2b8a663d3f266a416e4
treeba1d722f0eebbb2e93a9a92061de4aebed5521b8
parente90330f9f67267dfbecceeaea50778812dfeee35
xfs: force writes to delalloc regions to unwritten

Source kernel commit: a5949d3faedf492fa7863b914da408047ab46eb0

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.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c