diff options
author | John Garry <john.g.garry@oracle.com> | 2025-05-07 14:18:30 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2025-05-07 14:25:32 -0700 |
commit | 11ab31909d7cc177fab981cd0d6822a570244599 (patch) | |
tree | c2e7de8dfcd5b7a6da706e28fe9f2d00bd7803e2 /scripts/gdb/linux/utils.py | |
parent | bd1d2c21d5d2496f01b2d1fce07ec2e0da05dd3e (diff) |
xfs: add large atomic writes checks in xfs_direct_write_iomap_begin()
For when large atomic writes (> 1x FS block) are supported, there will be
various occasions when HW offload may not be possible.
Such instances include:
- unaligned extent mapping wrt write length
- extent mappings which do not cover the full write, e.g. the write spans
sparse or mixed-mapping extents
- the write length is greater than HW offload can support
- no hardware support at all
In those cases, we need to fallback to the CoW-based atomic write mode. For
this, report special code -ENOPROTOOPT to inform the caller that HW
offload-based method is not possible.
In addition to the occasions mentioned, if the write covers an unallocated
range, we again judge that we need to rely on the CoW-based method when we
would need to allocate anything more than 1x block. This is because if we
allocate less blocks that is required for the write, then again HW
offload-based method would not be possible. So we are taking a pessimistic
approach to writes covering unallocated space.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: various cleanups]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions