Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32972383 authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers
Browse files

xfs: make largest supported offset less shouty



XFS_MAXIOFFSET() is just a simple macro that resolves to
mp->m_maxioffset. It doesn't need to exist, and it just makes the
code unnecessarily loud and shouty.

Make it quiet and easy to read.

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent d2c28191
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5517,7 +5517,7 @@ xfs_getbmap(
		if (xfs_get_extsz_hint(ip) ||
		    ip->i_d.di_flags & (XFS_DIFLAG_PREALLOC|XFS_DIFLAG_APPEND)){
			prealloced = 1;
			fixlen = XFS_MAXIOFFSET(mp);
			fixlen = mp->m_super->s_maxbytes;
		} else {
			prealloced = 0;
			fixlen = XFS_ISIZE(ip);
+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ xfs_file_aio_read(
		}
	}

	n = XFS_MAXIOFFSET(mp) - iocb->ki_pos;
	n = mp->m_super->s_maxbytes - iocb->ki_pos;
	if (n <= 0 || size == 0)
		return 0;

+1 −1
Original line number Diff line number Diff line
@@ -1226,7 +1226,7 @@ xfs_itruncate_extents(
	 * then there is nothing to do.
	 */
	first_unmap_block = XFS_B_TO_FSB(mp, (xfs_ufsize_t)new_size);
	last_block = XFS_B_TO_FSB(mp, (xfs_ufsize_t)XFS_MAXIOFFSET(mp));
	last_block = XFS_B_TO_FSB(mp, mp->m_super->s_maxbytes);
	if (first_unmap_block == last_block)
		return 0;

+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ xfs_iomap_eof_want_preallocate(
	 * do any speculative allocation.
	 */
	start_fsb = XFS_B_TO_FSBT(mp, ((xfs_ufsize_t)(offset + count - 1)));
	count_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)XFS_MAXIOFFSET(mp));
	count_fsb = XFS_B_TO_FSB(mp, mp->m_super->s_maxbytes);
	while (count_fsb > 0) {
		imaps = nimaps;
		firstblock = NULLFSBLOCK;
+0 −2
Original line number Diff line number Diff line
@@ -296,8 +296,6 @@ xfs_preferred_iosize(xfs_mount_t *mp)
			PAGE_CACHE_SIZE));
}

#define XFS_MAXIOFFSET(mp)	((mp)->m_super->s_maxbytes)

#define XFS_LAST_UNMOUNT_WAS_CLEAN(mp)	\
				((mp)->m_flags & XFS_MOUNT_WAS_CLEAN)
#define XFS_FORCED_SHUTDOWN(mp)	((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN)
Loading