linux-stable/fs/xfs
Brian Foster c017cb5ddf xfs: eliminate duplicate icreate tx reservation functions
The create transaction reservation calculation has two different
branches of code depending on whether the filesystem is a v5 format
fs or older. Each branch considers the max reservation between the
allocation case (new chunk allocation + record insert) and the
modify case (chunk exists, record modification) of inode allocation.

The modify case is the same for both superblock versions with the
exception of the finobt. The finobt helper checks the feature bit,
however, and so the modify case already shares the same code.

Now that inode chunk allocation has been refactored into a helper
that checks the superblock version to calculate the appropriate
reservation for the create transaction, the only remaining
difference between the create and icreate branches is the call to
the finobt helper. As noted above, the finobt helper is a no-op when
the feature is not enabled. Therefore, these branches are
effectively duplicate and can be condensed.

Remove the xfs_calc_create_*() branch of functions and update the
various callers to use the xfs_calc_icreate_*() variant. The latter
creates the same reservation size for v4 create transactions as the
removed branch. As such, this patch does not result in transaction
reservation changes.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2018-01-08 10:41:38 -08:00
..
libxfs xfs: eliminate duplicate icreate tx reservation functions 2018-01-08 10:41:38 -08:00
scrub xfs: scrub inode nsec fields 2018-01-08 10:41:35 -08:00
Kconfig xfs: create an ioctl to scrub AG metadata 2017-10-26 15:38:23 -07:00
kmem.c
kmem.h slab, slub, slob: add slab_flags_t 2017-11-15 18:21:01 -08:00
Makefile xfs: use a b+tree for the in-core extent list 2017-11-06 11:53:41 -08:00
mrlock.h
xfs.h xfs: always define STATIC to static noinline 2017-11-06 11:53:58 -08:00
xfs_acl.c xfs: don't change inode mode if ACL update fails 2017-10-11 10:21:06 -07:00
xfs_acl.h
xfs_aops.c xfs: fix s_maxbytes overflow problems 2018-01-02 10:16:32 -08:00
xfs_aops.h
xfs_attr.h xfs: scrub extended attributes 2017-10-26 15:38:26 -07:00
xfs_attr_inactive.c xfs: fail if xattr inactivation hits a hole 2017-10-26 15:38:22 -07:00
xfs_attr_list.c xfs: remove u_int* type usage 2017-11-09 15:50:29 -08:00
xfs_bmap_item.c xfs: log recovery should replay deferred ops in order 2017-11-27 09:34:08 -08:00
xfs_bmap_item.h xfs: log recovery should replay deferred ops in order 2017-11-27 09:34:08 -08:00
xfs_bmap_util.c xfs: remove support for inlining data/extents into the inode fork 2017-11-06 11:53:40 -08:00
xfs_bmap_util.h xfs: simplify the xfs_getbmap interface 2017-10-26 15:38:20 -07:00
xfs_buf.c xfs: fortify xfs_alloc_buftarg error handling 2017-11-28 08:57:11 -08:00
xfs_buf.h xfs: buffer lru reference count error injection tag 2017-10-26 15:38:23 -07:00
xfs_buf_item.c
xfs_buf_item.h
xfs_dir2_readdir.c xfs: introduce the xfs_iext_cursor abstraction 2017-11-06 11:53:40 -08:00
xfs_discard.c
xfs_discard.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfs_dquot.c xfs: Properly retry failed dquot items in case of error during buffer writeback 2017-11-30 08:47:40 -08:00
xfs_dquot.h
xfs_dquot_item.c xfs: Properly retry failed dquot items in case of error during buffer writeback 2017-11-30 08:47:40 -08:00
xfs_dquot_item.h
xfs_error.c xfs: mark xfs_errortag_ktype static 2017-11-06 11:57:39 -08:00
xfs_error.h xfs: move error injection tags into their own file 2017-11-01 15:03:16 -07:00
xfs_export.c
xfs_export.h
xfs_extent_busy.c
xfs_extent_busy.h
xfs_extfree_item.c xfs: always honor OWN_UNKNOWN rmap removal requests 2017-12-21 08:48:38 -08:00
xfs_extfree_item.h
xfs_file.c libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
xfs_filestream.c
xfs_filestream.h
xfs_fsmap.c xfs: move two more RT specific functions into CONFIG_XFS_RT 2017-10-16 12:26:50 -07:00
xfs_fsmap.h
xfs_fsops.c xfs: always honor OWN_UNKNOWN rmap removal requests 2017-12-21 08:48:38 -08:00
xfs_fsops.h
xfs_globals.c
xfs_icache.c xfs: remove leftover CoW reservations when remounting ro 2017-12-21 08:47:32 -08:00
xfs_icache.h xfs: remove leftover CoW reservations when remounting ro 2017-12-21 08:47:32 -08:00
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode.c xfs: don't be so eager to clear the cowblocks tag on truncate 2017-12-21 08:47:28 -08:00
xfs_inode.h xfs: track cowblocks separately in i_flags 2017-12-20 17:11:48 -08:00
xfs_inode_item.c xfs: use a b+tree for the in-core extent list 2017-11-06 11:53:41 -08:00
xfs_inode_item.h xfs: remove inode log format typedef 2017-11-01 15:03:16 -07:00
xfs_ioctl.c xfs: remove u_int* type usage 2017-11-09 15:50:29 -08:00
xfs_ioctl.h xfs: remove u_int* type usage 2017-11-09 15:50:29 -08:00
xfs_ioctl32.c xfs: create an ioctl to scrub AG metadata 2017-10-26 15:38:23 -07:00
xfs_ioctl32.h
xfs_iomap.c xfs: fix s_maxbytes overflow problems 2018-01-02 10:16:32 -08:00
xfs_iomap.h xfs: update i_size after unwritten conversion in dio completion 2017-09-26 10:55:19 -07:00
xfs_iops.c xfs: truncate pagecache before writeback in xfs_setattr_size() 2017-11-03 09:45:56 -07:00
xfs_iops.h
xfs_itable.c xfs: remove if_rdev 2017-10-26 15:38:27 -07:00
xfs_itable.h xfs: create inode pointer verifiers 2017-10-26 15:38:23 -07:00
xfs_linux.h xfs: Show realtime device stats on statfs calls if realtime flags set 2018-01-08 10:41:33 -08:00
xfs_log.c xfs: print transaction log reservation on overrun 2018-01-08 10:41:35 -08:00
xfs_log.h
xfs_log_cil.c
xfs_log_priv.h locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
xfs_log_recover.c xfs: log recovery should replay deferred ops in order 2017-11-27 09:34:08 -08:00
xfs_message.c
xfs_message.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfs_mount.c xfs: on failed mount, force-reclaim inodes after unmounting quota controls 2017-11-09 19:27:33 -08:00
xfs_mount.h
xfs_mru_cache.c
xfs_mru_cache.h
xfs_ondisk.h xfs: Don't log uninitialised fields in inode structures 2017-10-11 10:21:06 -07:00
xfs_pnfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfs_pnfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfs_qm.c xfs: quota: check result of register_shrinker() 2018-01-02 10:16:32 -08:00
xfs_qm.h
xfs_qm_bhv.c
xfs_qm_syscalls.c
xfs_quota.h
xfs_quotaops.c
xfs_refcount_item.c xfs: log recovery should replay deferred ops in order 2017-11-27 09:34:08 -08:00
xfs_refcount_item.h xfs: log recovery should replay deferred ops in order 2017-11-27 09:34:08 -08:00
xfs_reflink.c xfs: set cowblocks tag for direct cow writes too 2017-12-21 08:47:37 -08:00
xfs_reflink.h
xfs_rmap_item.c
xfs_rmap_item.h
xfs_rtalloc.c
xfs_rtalloc.h xfs: create block pointer check functions 2017-10-26 15:38:23 -07:00
xfs_stats.c
xfs_stats.h
xfs_super.c xfs: Show realtime device stats on statfs calls if realtime flags set 2018-01-08 10:41:33 -08:00
xfs_super.h Rename superblock flags (MS_xyz -> SB_xyz) 2017-11-27 13:05:09 -08:00
xfs_symlink.c xfs: remove "no-allocation" reservations for file creations 2017-12-08 17:51:05 -08:00
xfs_symlink.h
xfs_sysctl.c
xfs_sysctl.h
xfs_sysfs.c
xfs_sysfs.h
xfs_trace.c fs: xfs: remove duplicate includes 2017-12-08 17:51:05 -08:00
xfs_trace.h libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
xfs_trans.c
xfs_trans.h
xfs_trans_ail.c xfs: move error injection tags into their own file 2017-11-01 15:03:16 -07:00
xfs_trans_bmap.c
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_priv.h
xfs_trans_refcount.c
xfs_trans_rmap.c
xfs_xattr.c