linux_dsm_epyc7002/fs/xfs
Darrick J. Wong 2fe4f92834 xfs: refactor "does this fork map blocks" predicate
Replace the open-coded checks for whether or not an inode fork maps
blocks with a macro that will implant the code for us.  This helps us
declutter the bmap code a bit.

Note that I had to use a macro instead of a static inline function
because of C header dependency problems between xfs_inode.h and
xfs_inode_fork.h.

Conversion was performed with the following Coccinelle script:

@@
expression ip, w;
@@

- XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_EXTENTS || XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_BTREE
+ xfs_ifork_has_extents(ip, w)

@@
expression ip, w;
@@

- XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_EXTENTS && XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_BTREE
+ !xfs_ifork_has_extents(ip, w)

@@
expression ip, w;
@@

- XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_BTREE || XFS_IFORK_FORMAT(ip, w) == XFS_DINODE_FMT_EXTENTS
+ xfs_ifork_has_extents(ip, w)

@@
expression ip, w;
@@

- XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_BTREE && XFS_IFORK_FORMAT(ip, w) != XFS_DINODE_FMT_EXTENTS
+ !xfs_ifork_has_extents(ip, w)

@@
expression ip, w;
@@

- (xfs_ifork_has_extents(ip, w))
+ xfs_ifork_has_extents(ip, w)

@@
expression ip, w;
@@

- (!xfs_ifork_has_extents(ip, w))
+ !xfs_ifork_has_extents(ip, w)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2019-11-10 10:22:51 -08:00
..
libxfs xfs: refactor "does this fork map blocks" predicate 2019-11-10 10:22:51 -08:00
scrub xfs: refactor "does this fork map blocks" predicate 2019-11-10 10:22:51 -08:00
Kconfig
kmem.c xfs: Correct comment tyops -> typos 2019-11-10 10:21:57 -08:00
kmem.h
Makefile
mrlock.h
xfs_acl.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
xfs_acl.h
xfs_aops.c xfs: add a xfs_inode_buftarg helper 2019-10-28 08:37:54 -07:00
xfs_aops.h xfs: add a xfs_inode_buftarg helper 2019-10-28 08:37:54 -07:00
xfs_attr_inactive.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_attr_list.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_bio_io.c
xfs_bmap_item.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_bmap_item.h
xfs_bmap_util.c xfs: move extent zeroing to xfs_bmapi_allocate 2019-11-03 10:22:30 -08:00
xfs_bmap_util.h xfs: simplify xfs_iomap_eof_align_last_fsb 2019-11-03 10:22:30 -08:00
xfs_buf_item.c xfs: "optimize" buffer item log segment bitmap setting 2019-11-07 13:00:54 -08:00
xfs_buf_item.h
xfs_buf.c xfs: Correct comment tyops -> typos 2019-11-10 10:21:57 -08:00
xfs_buf.h xfs: mark xfs_buf_free static 2019-10-28 08:37:54 -07:00
xfs_dir2_readdir.c xfs: namecheck directory entry names before listing them 2019-10-29 09:50:11 -07:00
xfs_discard.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
xfs_discard.h
xfs_dquot_item.c
xfs_dquot_item.h
xfs_dquot.c xfs: replace -EIO with -EFSCORRUPTED for corrupt metadata 2019-10-29 09:50:11 -07:00
xfs_dquot.h
xfs_error.c xfs: use super s_id instead of struct xfs_mount m_fsname 2019-11-05 08:28:25 -08:00
xfs_error.h xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_export.c
xfs_export.h
xfs_extent_busy.c xfs: cleanup use of the XFS_ALLOC_ flags 2019-11-03 10:22:31 -08:00
xfs_extent_busy.h
xfs_extfree_item.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_extfree_item.h
xfs_file.c xfs: properly serialise fallocate against AIO+DIO 2019-10-31 09:17:55 -07:00
xfs_filestream.c xfs: cleanup use of the XFS_ALLOC_ flags 2019-11-03 10:22:31 -08:00
xfs_filestream.h
xfs_fsmap.c xfs: add missing assert in xfs_fsmap_owner_from_rmap 2019-11-05 08:28:27 -08:00
xfs_fsmap.h
xfs_fsops.c
xfs_fsops.h
xfs_globals.c
xfs_health.c
xfs_icache.c
xfs_icache.h
xfs_icreate_item.c
xfs_icreate_item.h
xfs_inode_item.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_inode_item.h
xfs_inode.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_inode.h xfs: add a xfs_inode_buftarg helper 2019-10-28 08:37:54 -07:00
xfs_ioctl32.c fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers 2019-10-28 08:37:55 -07:00
xfs_ioctl32.h
xfs_ioctl.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
xfs_ioctl.h fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers 2019-10-28 08:37:55 -07:00
xfs_iomap.c xfs: refactor "does this fork map blocks" predicate 2019-11-10 10:22:51 -08:00
xfs_iomap.h xfs: simplify the xfs_iomap_write_direct calling 2019-11-03 10:22:30 -08:00
xfs_iops.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_iops.h
xfs_itable.c
xfs_itable.h
xfs_iwalk.c
xfs_iwalk.h
xfs_linux.h xfs: make the assertion message functions take a mount parameter 2019-11-05 08:28:27 -08:00
xfs_log_cil.c xfs: Correct comment tyops -> typos 2019-11-10 10:21:57 -08:00
xfs_log_priv.h xfs: annotate functions that trip static checker locking checks 2019-11-10 10:21:58 -08:00
xfs_log_recover.c xfs: range check ri_cnt when recovering log items 2019-11-07 13:00:54 -08:00
xfs_log.c xfs: annotate functions that trip static checker locking checks 2019-11-10 10:21:58 -08:00
xfs_log.h
xfs_message.c xfs: make the assertion message functions take a mount parameter 2019-11-05 08:28:27 -08:00
xfs_message.h xfs: make the assertion message functions take a mount parameter 2019-11-05 08:28:27 -08:00
xfs_mount.c xfs: use super s_id instead of struct xfs_mount m_fsname 2019-11-05 08:28:25 -08:00
xfs_mount.h xfs: use super s_id instead of struct xfs_mount m_fsname 2019-11-05 08:28:25 -08:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_ondisk.h
xfs_pnfs.c xfs: use super s_id instead of struct xfs_mount m_fsname 2019-11-05 08:28:25 -08:00
xfs_pnfs.h
xfs_pwork.c
xfs_pwork.h
xfs_qm_bhv.c
xfs_qm_syscalls.c
xfs_qm.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_qm.h
xfs_quota.h
xfs_quotaops.c xfs: Sanity check flags of Q_XQUOTARM call 2019-10-24 08:05:24 -07:00
xfs_refcount_item.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_refcount_item.h
xfs_reflink.c xfs: don't set bmapi total block req where minleft is 2019-10-23 17:01:08 -07:00
xfs_reflink.h xfs: pass two imaps to xfs_reflink_allocate_cow 2019-10-21 09:04:58 -07:00
xfs_rmap_item.c xfs: always log corruption errors 2019-11-04 13:55:54 -08:00
xfs_rmap_item.h
xfs_rtalloc.c xfs: don't set bmapi total block req where minleft is 2019-10-23 17:01:08 -07:00
xfs_rtalloc.h
xfs_stats.c
xfs_stats.h
xfs_super.c xfs: remove redundant assignment to variable error 2019-11-06 08:07:46 -08:00
xfs_super.h xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS 2019-10-21 09:04:57 -07:00
xfs_symlink.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
xfs_symlink.h xfs: Correct comment tyops -> typos 2019-11-10 10:21:57 -08:00
xfs_sysctl.c
xfs_sysctl.h
xfs_sysfs.c xfs: avoid unused to_mp() function warning 2019-09-24 09:40:19 -07:00
xfs_sysfs.h
xfs_trace.c
xfs_trace.h xfs: rename the m_writeio_* fields in struct xfs_mount 2019-10-29 09:50:12 -07:00
xfs_trans_ail.c xfs: Correct comment tyops -> typos 2019-11-10 10:21:57 -08:00
xfs_trans_buf.c
xfs_trans_dquot.c
xfs_trans_priv.h
xfs_trans.c
xfs_trans.h
xfs_xattr.c xfs: fix missing header includes 2019-11-07 13:00:53 -08:00
xfs.h