linux_dsm_epyc7002/fs/xfs/libxfs
Darrick J. Wong e1a4e37cc7 xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent
In a pathological scenario where we are trying to bunmapi a single
extent in which every other block is shared, it's possible that trying
to unmap the entire large extent in a single transaction can generate so
many EFIs that we overflow the transaction reservation.

Therefore, use a heuristic to guess at the number of blocks we can
safely unmap from a reflink file's data fork in an single transaction.
This should prevent problems such as the log head slamming into the tail
and ASSERTs that trigger because we've exceeded the transaction
reservation.

Note that since bunmapi can fail to unmap the entire range, we must also
teach the deferred unmap code to roll into a new transaction whenever we
get low on reservation.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
[hch: random edits, all bugs are my fault]
Signed-off-by: Christoph Hellwig <hch@lst.de>
2017-06-19 08:59:10 -07:00
..
xfs_ag_resv.c xfs: use per-AG reservations for the finobt 2017-01-25 07:49:35 -08:00
xfs_ag_resv.h xfs: set up per-AG free space reservations 2016-09-19 10:30:52 +10:00
xfs_alloc_btree.c xfs: plumb in needed functions for range querying of the freespace btrees 2017-04-03 15:18:17 -07:00
xfs_alloc_btree.h libxfs: move header files 2014-06-25 14:57:36 +10:00
xfs_alloc.c xfs: create a function to query all records in a btree 2017-04-03 15:18:17 -07:00
xfs_alloc.h xfs: create a function to query all records in a btree 2017-04-03 15:18:17 -07:00
xfs_attr_leaf.c xfs: ignore leaf attr ichdr.count in verifier during log replay 2016-12-09 16:49:47 +11:00
xfs_attr_leaf.h Merge branch 'xfs-4.10-misc-fixes-3' into for-next 2016-12-07 17:42:30 +11:00
xfs_attr_remote.c xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_attr_remote.h libxfs: move header files 2014-06-25 14:57:36 +10:00
xfs_attr_sf.h xfs: move struct xfs_attr_shortform to xfs_da_format.h 2016-02-08 15:00:01 +11:00
xfs_attr.c xfs: remove racy hasattr check from attr ops 2017-01-25 07:53:43 -08:00
xfs_bit.c libxfs: Optimize the loop for xfs_bitmap_empty 2016-01-04 16:10:19 +11:00
xfs_bit.h libxfs: move header files 2014-06-25 14:57:36 +10:00
xfs_bmap_btree.c xfs: simplify validation of the unwritten extent bit 2017-04-25 09:40:41 -07:00
xfs_bmap_btree.h xfs: simplify validation of the unwritten extent bit 2017-04-25 09:40:41 -07:00
xfs_bmap.c xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent 2017-06-19 08:59:10 -07:00
xfs_bmap.h xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent 2017-06-19 08:59:10 -07:00
xfs_btree.c xfs: fix unaligned access in xfs_btree_visit_blocks 2017-05-25 09:42:25 -07:00
xfs_btree.h xfs: create a function to query all records in a btree 2017-04-03 15:18:17 -07:00
xfs_cksum.h xfs: optimise CRC updates 2016-12-05 14:40:32 +11:00
xfs_da_btree.c xfs: fail _dir_open when readahead fails 2017-02-02 15:13:58 -08:00
xfs_da_btree.h xfs: fail _dir_open when readahead fails 2017-02-02 15:13:58 -08:00
xfs_da_format.c xfs: kill xfs_dir2_inou_t 2016-07-20 11:48:31 +10:00
xfs_da_format.h xfs: fix attr shortform structure alignment on cris 2016-08-03 10:59:42 +10:00
xfs_defer.c xfs: defer should abort intent items if the trans roll fails 2016-10-24 14:21:18 +11:00
xfs_defer.h xfs: implement deferred bmbt map/unmap operations 2016-10-04 11:05:44 -07:00
xfs_dir2_block.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_dir2_data.c Merge branch 'xfs-4.10-misc-fixes-3' into for-next 2016-12-07 17:42:30 +11:00
xfs_dir2_leaf.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_dir2_node.c xfs: verify free block header fields 2017-02-02 15:14:00 -08:00
xfs_dir2_priv.h xfs: rework the inline directory verifiers 2017-04-03 12:22:20 -07:00
xfs_dir2_sf.c xfs: rework the inline directory verifiers 2017-04-03 12:22:20 -07:00
xfs_dir2.c xfs: fix xfs_mode_to_ftype() prototype 2017-01-18 12:39:21 -08:00
xfs_dir2.h xfs: fix xfs_mode_to_ftype() prototype 2017-01-18 12:39:21 -08:00
xfs_dquot_buf.c xfs: simplify xfs_calc_dquots_per_chunk 2017-04-12 08:42:51 -07:00
xfs_format.h xfs: simplify validation of the unwritten extent bit 2017-04-25 09:40:41 -07:00
xfs_fs.h xfs: implement the GETFSMAP ioctl 2017-04-03 15:18:17 -07:00
xfs_ialloc_btree.c xfs: use per-AG reservations for the finobt 2017-01-25 07:49:35 -08:00
xfs_ialloc_btree.h xfs: use per-AG reservations for the finobt 2017-01-25 07:49:35 -08:00
xfs_ialloc.c xfs: Use xfs_icluster_size_fsb() to calculate inode chunk alignment 2017-02-16 17:20:38 -08:00
xfs_ialloc.h xfs: rename flist/free_list to dfops 2016-08-03 11:19:29 +10:00
xfs_inode_buf.c xfs: fix up inode validation failure message 2017-04-03 15:18:16 -07:00
xfs_inode_buf.h libxfs: convert ushort to unsigned short 2016-11-08 11:55:48 +11:00
xfs_inode_fork.c xfs: simplify validation of the unwritten extent bit 2017-04-25 09:40:41 -07:00
xfs_inode_fork.h xfs: rework the inline directory verifiers 2017-04-03 12:22:20 -07:00
xfs_log_format.h libxfs: convert ushort to unsigned short 2016-11-08 11:55:48 +11:00
xfs_log_recover.h xfs: remove unused struct declarations 2017-01-30 16:32:25 -08:00
xfs_log_rlimit.c xfs: move most of xfs_sb.h to xfs_format.h 2014-11-28 14:27:09 +11:00
xfs_quota_defs.h xfs: wire up Q_XGETNEXTQUOTA / get_nextdqblk 2016-02-08 11:27:38 +11:00
xfs_refcount_btree.c xfs: use the actual AG length when reserving blocks 2017-01-03 18:39:33 -08:00
xfs_refcount_btree.h xfs: use the actual AG length when reserving blocks 2017-01-03 18:39:33 -08:00
xfs_refcount.c xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent 2017-06-19 08:59:10 -07:00
xfs_refcount.h xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent 2017-06-19 08:59:10 -07:00
xfs_rmap_btree.c xfs: use the actual AG length when reserving blocks 2017-01-03 18:39:33 -08:00
xfs_rmap_btree.h xfs: use the actual AG length when reserving blocks 2017-01-03 18:39:33 -08:00
xfs_rmap.c xfs: implement the GETFSMAP ioctl 2017-04-03 15:18:17 -07:00
xfs_rmap.h xfs: implement the GETFSMAP ioctl 2017-04-03 15:18:17 -07:00
xfs_rtbitmap.c xfs: add a couple of queries to iterate free extents in the rtbitmap 2017-04-03 15:18:17 -07:00
xfs_sb.c xfs: verify dirblocklog correctly 2017-01-24 12:23:33 -08:00
xfs_sb.h xfs: remove unused function definitions 2016-02-08 14:58:07 +11:00
xfs_shared.h xfs: define the on-disk refcount btree format 2016-10-03 09:11:18 -07:00
xfs_symlink_remote.c xfs: print name of verifier if it fails 2016-01-04 16:10:19 +11:00
xfs_trans_resv.c xfs: increase log reservations for reflink 2016-10-05 16:26:29 -07:00
xfs_trans_resv.h xfs: increase log reservations for reflink 2016-10-05 16:26:29 -07:00
xfs_trans_space.h xfs: reserve enough blocks to handle btree splits when remapping 2017-05-03 13:21:40 -07:00
xfs_types.h Merge branch 'xfs-4.10-extent-lookup' into for-next 2016-11-24 11:41:59 +11:00