]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: Check for extent overflow when moving extent from cow to data fork
authorChandan Babu R <chandanrlinux@gmail.com>
Mon, 5 Apr 2021 21:58:16 +0000 (17:58 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 5 Apr 2021 21:58:16 +0000 (17:58 -0400)
commit594b2f2868de67f450407f21300461b0eca3d515
tree8b3a17fde4e4f186250e5bd191926e6a29df42da
parentb4024c158d4c5bf8efc1cac965783fd8444b032e
xfs: Check for extent overflow when moving extent from cow to data fork

Source kernel commit: 5f1d5bbfb2e674052a9fe542f53678978af20770

Moving an extent to data fork can cause a sub-interval of an existing
extent to be unmapped. This will increase extent count by 1. Mapping in
the new extent can increase the extent count by 1 again i.e.
| Old extent | New extent | Old extent |
Hence number of extents increases by 2.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_inode_fork.h