All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: prevent overflow of delalloc block counters
@ 2019-04-17  1:39 Darrick J. Wong
  2019-04-17  1:39 ` [PATCH 1/2] xfs: widen quota block counters to 64-bit integers Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Darrick J. Wong @ 2019-04-17  1:39 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-23  6:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17  1:39 [PATCH 0/2] xfs: prevent overflow of delalloc block counters Darrick J. Wong
2019-04-17  1:39 ` [PATCH 1/2] xfs: widen quota block counters to 64-bit integers Darrick J. Wong
2019-04-17  3:06   ` Allison Henderson
2019-04-17  6:25     ` Darrick J. Wong
2019-04-17 21:08   ` Dave Chinner
2019-04-23  6:27   ` Christoph Hellwig
2019-04-17  1:39 ` [PATCH 2/2] xfs: widen inode delalloc block counter to 64-bits Darrick J. Wong
2019-04-17  3:06   ` Allison Henderson
2019-04-17 21:10   ` Dave Chinner
2019-04-23  6:28   ` Christoph Hellwig
2019-04-17  6:24 ` [PATCH 3/2] xfstests: check for COW overflows in i_delayed_blks Darrick J. Wong
2019-04-17 21:29   ` Dave Chinner
2019-04-17 22:24     ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.