Re: [PATCH 05/16] xfs: replace xfs_sb_version checks with feature flag checks

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

 



On Wed, Jul 14, 2021 at 02:19:01PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Convert the xfs_sb_version_hasfoo() to checks against
> mp->m_features. Checks of the superblock itself during disk
> operations (e.g. in the read/write verifiers and the to/from disk
> formatters) are not converted - they operate purely on the
> superblock state. Everything else should use the mount features.
> 
> Large parts of this conversion were done with sed with commands like
> this:
> 
> for f in `git grep -l xfs_sb_version_has fs/xfs/*.c`; do
> 	sed -i -e 's/xfs_sb_version_has\(.*\)(&\(.*\)->m_sb)/xfs_has_\1(\2)/' $f
> done
> 
> With manual cleanups for things like "xfs_has_extflgbit" and other
> little inconsistencies in naming.
> 
> The result is ia lot less typing to check features and an XFS binary
> size reduced by a bit over 3kB:
> 
> $ size -t fs/xfs/built-in.a
> 	text	   data	    bss	    dec	    hex	filenam
> before	1130866  311352     484 1442702  16038e (TOTALS)
> after	1127727  311352     484 1439563  15f74b (TOTALS)

Impressive!

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[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