Re: [PATCH] xfs/533: Delete test since directory's extent count can never overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 06, 2022 at 03:27:46PM +0530, Chandan Babu R wrote:
> The maximum file size that can be represented by the data fork extent counter
> in the worst case occurs when all extents are 1 block in length and each block
> is 1KB in size.
> 
> With XFS_MAX_EXTCNT_DATA_FORK_SMALL representing maximum extent count and with
> 1KB sized blocks, a file can reach upto,
> (2^31) * 1KB = 2TB
> 
> This is much larger than the theoretical maximum size of a directory
> i.e. XFS_DIR2_SPACE_SIZE * 3 = ~96GB.
> 
> Since a directory can never overflow its data fork extent counter, the xfs
> kernel driver removed code which checked for such a situation before any
> directory modification operation could be executed. Instead, the kernel driver
> verifies the sanity of directory's data fork extent counter when the inode is
> read from disk.
> 
> This commit removes the test xfs/533 due to the reasons mentioned above.
> 
> Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>

Thanks Chandan!

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux