[PATCH 0/2] xfs: prevent overflow of delalloc block counters

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

 



Hi all,

This series corrects an integer overflow problem in the inode
i_delayed_blks counter that tracks the number of blocks assigned to the
in-core inode but not reflected in the on-disk metadata.

The first patch widens the in-core dquot to handle block reservations
counts that are 64 bits in size.  This is a requirement for the second
patch, which widens i_delayed_blks to 64 bits.

This rework is required to handle large amounts of COW staging blocks.
Right now the only way to trigger it is to set the maximum cow extent
size hint, reflink a very large (> 16T on a 4k block fs) sparse file,
and then touch enough blocks to cause the cow reservations to exceed
2^32 blocks.

This happens because i_delayed_blks tracks both actual delalloc
reservations in data and cow forks as well as allocated but not yet
remapped real extents in the cow fork.  The overflow will become more
practical when the atomic writes patch lands, whenever that is.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=widen-idelayed

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=widen-idelayed

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=widen-idelayed



[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