diff options
author | Christoph Hellwig <hch@lst.de> | 2024-08-27 07:03:21 +0200 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-09-03 10:07:47 +0530 |
commit | 90fa22da6d6b41dc17435aff7b800f9ca3c00401 (patch) | |
tree | bc4a367116c258848a798c59857aa6b3f66c3e1e /mm | |
parent | 866cf1dd3d5cc03e6544a9582ef9c79ecdfc92c0 (diff) |
xfs: ensure st_blocks never goes to zero during COW writes
COW writes remove the amount overwritten either directly for delalloc
reservations, or in earlier deferred transactions than adding the new
amount back in the bmap map transaction. This means st_blocks on an
inode where all data is overwritten using the COW path can temporarily
show a 0 st_blocks. This can easily be reproduced with the pending
zoned device support where all writes use this path and trips the
check in generic/615, but could also happen on a reflink file without
that.
Fix this by temporarily add the pending blocks to be mapped to
i_delayed_blks while the item is queued.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions