diff options
author | Chandan Babu R <[email protected]> | 2021-03-25 11:48:18 -0700 |
---|---|---|
committer | Darrick J. Wong <[email protected]> | 2021-04-07 14:36:33 -0700 |
commit | 5147ef30f2cd128c9eedf7a697e8cb2ce2767989 (patch) | |
tree | cf5b4827fc81a3a22a809b8696856ebfa73e2e75 /include/linux/fpga/fpga-mgr.h | |
parent | 25dfa65f814951a33072bcbae795989d817858da (diff) |
xfs: Fix dax inode extent calculation when direct write is performed on an unwritten extent
With dax enabled filesystems, a direct write operation into an existing
unwritten extent results in xfs_iomap_write_direct() zero-ing and converting
the extent into a normal extent before the actual data is copied from the
userspace buffer.
The inode extent count can increase by 2 if the extent range being written to
maps to the middle of the existing unwritten extent range. Hence this commit
uses XFS_IEXT_WRITE_UNWRITTEN_CNT as the extent count delta when such a write
operation is being performed.
Fixes: 727e1acd297c ("xfs: Check for extent overflow when trivally adding a new extent")
Reported-by: Darrick J. Wong <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions