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

Commit 8b90a33f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dave Chinner
Browse files

xfs: don't try to use the filestream allocator for metadata allocations



xfs_bmap_btalloc_nullfb has two entirely different control flows when
using the filestream allocator vs the regular one, but it get the
conditionals wrong and ends up mixing the two for metadata allocations.
Fix this by adding a missing userdata check and slight refactoring.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent c9eaa447
Loading
Loading
Loading
Loading
+20 −22
Original line number Diff line number Diff line
@@ -3566,11 +3566,10 @@ xfs_bmap_btalloc_nullfb(
		} else
			notinit = 1;

		if (xfs_inode_is_filestream(ap->ip)) {
		if (xfs_inode_is_filestream(ap->ip) && ap->userdata) {
			if (*blen >= args->maxlen)
				break;

			if (ap->userdata) {
			/*
			 * If startag is an invalid AG, we've
			 * come here once before and
@@ -3593,7 +3592,6 @@ xfs_bmap_btalloc_nullfb(
			pag = xfs_perag_get(mp, ag);
			continue;
		}
		}
		if (++ag == mp->m_sb.sb_agcount)
			ag = 0;
		if (ag == startag)