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

Commit 3a75667e authored by Dave Chinner's avatar Dave Chinner Committed by Alex Elder
Browse files

xfs: rename allocation range fields in struct xfs_bmalloca



Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
parent 0937e0fd
Loading
Loading
Loading
Loading
+69 −69
Original line number Original line Diff line number Diff line
@@ -2017,15 +2017,15 @@ xfs_bmap_adjacent(
	    !isnullstartblock(ap->prev.br_startblock) &&
	    !isnullstartblock(ap->prev.br_startblock) &&
	    ISVALID(ap->prev.br_startblock + ap->prev.br_blockcount,
	    ISVALID(ap->prev.br_startblock + ap->prev.br_blockcount,
		    ap->prev.br_startblock)) {
		    ap->prev.br_startblock)) {
		ap->rval = ap->prev.br_startblock + ap->prev.br_blockcount;
		ap->blkno = ap->prev.br_startblock + ap->prev.br_blockcount;
		/*
		/*
		 * Adjust for the gap between prevp and us.
		 * Adjust for the gap between prevp and us.
		 */
		 */
		adjust = ap->off -
		adjust = ap->offset -
			(ap->prev.br_startoff + ap->prev.br_blockcount);
			(ap->prev.br_startoff + ap->prev.br_blockcount);
		if (adjust &&
		if (adjust &&
		    ISVALID(ap->rval + adjust, ap->prev.br_startblock))
		    ISVALID(ap->blkno + adjust, ap->prev.br_startblock))
			ap->rval += adjust;
			ap->blkno += adjust;
	}
	}
	/*
	/*
	 * If not at eof, then compare the two neighbor blocks.
	 * If not at eof, then compare the two neighbor blocks.
@@ -2050,7 +2050,7 @@ xfs_bmap_adjacent(
			/*
			/*
			 * Calculate gap to end of previous block.
			 * Calculate gap to end of previous block.
			 */
			 */
			adjust = prevdiff = ap->off -
			adjust = prevdiff = ap->offset -
				(ap->prev.br_startoff +
				(ap->prev.br_startoff +
				 ap->prev.br_blockcount);
				 ap->prev.br_blockcount);
			/*
			/*
@@ -2061,7 +2061,7 @@ xfs_bmap_adjacent(
			 * allocating, or using it gives us an invalid block
			 * allocating, or using it gives us an invalid block
			 * number, then just use the end of the previous block.
			 * number, then just use the end of the previous block.
			 */
			 */
			if (prevdiff <= XFS_ALLOC_GAP_UNITS * ap->alen &&
			if (prevdiff <= XFS_ALLOC_GAP_UNITS * ap->length &&
			    ISVALID(prevbno + prevdiff,
			    ISVALID(prevbno + prevdiff,
				    ap->prev.br_startblock))
				    ap->prev.br_startblock))
				prevbno += adjust;
				prevbno += adjust;
@@ -2088,7 +2088,7 @@ xfs_bmap_adjacent(
			/*
			/*
			 * Calculate gap to start of next block.
			 * Calculate gap to start of next block.
			 */
			 */
			adjust = gotdiff = ap->got.br_startoff - ap->off;
			adjust = gotdiff = ap->got.br_startoff - ap->offset;
			/*
			/*
			 * Figure the startblock based on the next block's
			 * Figure the startblock based on the next block's
			 * start and the gap size.
			 * start and the gap size.
@@ -2101,12 +2101,12 @@ xfs_bmap_adjacent(
			 * number, then just use the start of the next block
			 * number, then just use the start of the next block
			 * offset by our length.
			 * offset by our length.
			 */
			 */
			if (gotdiff <= XFS_ALLOC_GAP_UNITS * ap->alen &&
			if (gotdiff <= XFS_ALLOC_GAP_UNITS * ap->length &&
			    ISVALID(gotbno - gotdiff, gotbno))
			    ISVALID(gotbno - gotdiff, gotbno))
				gotbno -= adjust;
				gotbno -= adjust;
			else if (ISVALID(gotbno - ap->alen, gotbno)) {
			else if (ISVALID(gotbno - ap->length, gotbno)) {
				gotbno -= ap->alen;
				gotbno -= ap->length;
				gotdiff += adjust - ap->alen;
				gotdiff += adjust - ap->length;
			} else
			} else
				gotdiff += adjust;
				gotdiff += adjust;
			/*
			/*
@@ -2124,14 +2124,14 @@ xfs_bmap_adjacent(
			gotbno = NULLFSBLOCK;
			gotbno = NULLFSBLOCK;
		/*
		/*
		 * If both valid, pick the better one, else the only good
		 * If both valid, pick the better one, else the only good
		 * one, else ap->rval is already set (to 0 or the inode block).
		 * one, else ap->blkno is already set (to 0 or the inode block).
		 */
		 */
		if (prevbno != NULLFSBLOCK && gotbno != NULLFSBLOCK)
		if (prevbno != NULLFSBLOCK && gotbno != NULLFSBLOCK)
			ap->rval = prevdiff <= gotdiff ? prevbno : gotbno;
			ap->blkno = prevdiff <= gotdiff ? prevbno : gotbno;
		else if (prevbno != NULLFSBLOCK)
		else if (prevbno != NULLFSBLOCK)
			ap->rval = prevbno;
			ap->blkno = prevbno;
		else if (gotbno != NULLFSBLOCK)
		else if (gotbno != NULLFSBLOCK)
			ap->rval = gotbno;
			ap->blkno = gotbno;
	}
	}
#undef ISVALID
#undef ISVALID
}
}
@@ -2153,22 +2153,22 @@ xfs_bmap_rtalloc(
	prod = align / mp->m_sb.sb_rextsize;
	prod = align / mp->m_sb.sb_rextsize;
	error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
	error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
					align, 1, ap->eof, 0,
					align, 1, ap->eof, 0,
					ap->conv, &ap->off, &ap->alen);
					ap->conv, &ap->offset, &ap->length);
	if (error)
	if (error)
		return error;
		return error;
	ASSERT(ap->alen);
	ASSERT(ap->length);
	ASSERT(ap->alen % mp->m_sb.sb_rextsize == 0);
	ASSERT(ap->length % mp->m_sb.sb_rextsize == 0);


	/*
	/*
	 * If the offset & length are not perfectly aligned
	 * If the offset & length are not perfectly aligned
	 * then kill prod, it will just get us in trouble.
	 * then kill prod, it will just get us in trouble.
	 */
	 */
	if (do_mod(ap->off, align) || ap->alen % align)
	if (do_mod(ap->offset, align) || ap->length % align)
		prod = 1;
		prod = 1;
	/*
	/*
	 * Set ralen to be the actual requested length in rtextents.
	 * Set ralen to be the actual requested length in rtextents.
	 */
	 */
	ralen = ap->alen / mp->m_sb.sb_rextsize;
	ralen = ap->length / mp->m_sb.sb_rextsize;
	/*
	/*
	 * If the old value was close enough to MAXEXTLEN that
	 * If the old value was close enough to MAXEXTLEN that
	 * we rounded up to it, cut it back so it's valid again.
	 * we rounded up to it, cut it back so it's valid again.
@@ -2189,15 +2189,15 @@ xfs_bmap_rtalloc(
	 * If it's an allocation to an empty file at offset 0,
	 * If it's an allocation to an empty file at offset 0,
	 * pick an extent that will space things out in the rt area.
	 * pick an extent that will space things out in the rt area.
	 */
	 */
	if (ap->eof && ap->off == 0) {
	if (ap->eof && ap->offset == 0) {
		xfs_rtblock_t uninitialized_var(rtx); /* realtime extent no */
		xfs_rtblock_t uninitialized_var(rtx); /* realtime extent no */


		error = xfs_rtpick_extent(mp, ap->tp, ralen, &rtx);
		error = xfs_rtpick_extent(mp, ap->tp, ralen, &rtx);
		if (error)
		if (error)
			return error;
			return error;
		ap->rval = rtx * mp->m_sb.sb_rextsize;
		ap->blkno = rtx * mp->m_sb.sb_rextsize;
	} else {
	} else {
		ap->rval = 0;
		ap->blkno = 0;
	}
	}


	xfs_bmap_adjacent(ap);
	xfs_bmap_adjacent(ap);
@@ -2205,23 +2205,23 @@ xfs_bmap_rtalloc(
	/*
	/*
	 * Realtime allocation, done through xfs_rtallocate_extent.
	 * Realtime allocation, done through xfs_rtallocate_extent.
	 */
	 */
	atype = ap->rval == 0 ?  XFS_ALLOCTYPE_ANY_AG : XFS_ALLOCTYPE_NEAR_BNO;
	atype = ap->blkno == 0 ?  XFS_ALLOCTYPE_ANY_AG : XFS_ALLOCTYPE_NEAR_BNO;
	do_div(ap->rval, mp->m_sb.sb_rextsize);
	do_div(ap->blkno, mp->m_sb.sb_rextsize);
	rtb = ap->rval;
	rtb = ap->blkno;
	ap->alen = ralen;
	ap->length = ralen;
	if ((error = xfs_rtallocate_extent(ap->tp, ap->rval, 1, ap->alen,
	if ((error = xfs_rtallocate_extent(ap->tp, ap->blkno, 1, ap->length,
				&ralen, atype, ap->wasdel, prod, &rtb)))
				&ralen, atype, ap->wasdel, prod, &rtb)))
		return error;
		return error;
	if (rtb == NULLFSBLOCK && prod > 1 &&
	if (rtb == NULLFSBLOCK && prod > 1 &&
	    (error = xfs_rtallocate_extent(ap->tp, ap->rval, 1,
	    (error = xfs_rtallocate_extent(ap->tp, ap->blkno, 1,
					   ap->alen, &ralen, atype,
					   ap->length, &ralen, atype,
					   ap->wasdel, 1, &rtb)))
					   ap->wasdel, 1, &rtb)))
		return error;
		return error;
	ap->rval = rtb;
	ap->blkno = rtb;
	if (ap->rval != NULLFSBLOCK) {
	if (ap->blkno != NULLFSBLOCK) {
		ap->rval *= mp->m_sb.sb_rextsize;
		ap->blkno *= mp->m_sb.sb_rextsize;
		ralen *= mp->m_sb.sb_rextsize;
		ralen *= mp->m_sb.sb_rextsize;
		ap->alen = ralen;
		ap->length = ralen;
		ap->ip->i_d.di_nblocks += ralen;
		ap->ip->i_d.di_nblocks += ralen;
		xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
		xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
		if (ap->wasdel)
		if (ap->wasdel)
@@ -2234,7 +2234,7 @@ xfs_bmap_rtalloc(
			ap->wasdel ? XFS_TRANS_DQ_DELRTBCOUNT :
			ap->wasdel ? XFS_TRANS_DQ_DELRTBCOUNT :
					XFS_TRANS_DQ_RTBCOUNT, (long) ralen);
					XFS_TRANS_DQ_RTBCOUNT, (long) ralen);
	} else {
	} else {
		ap->alen = 0;
		ap->length = 0;
	}
	}
	return 0;
	return 0;
}
}
@@ -2349,7 +2349,7 @@ xfs_bmap_btalloc_nullfb(
	 * AG as the stream may have moved.
	 * AG as the stream may have moved.
	 */
	 */
	if (xfs_inode_is_filestream(ap->ip))
	if (xfs_inode_is_filestream(ap->ip))
		ap->rval = args->fsbno = XFS_AGB_TO_FSB(mp, ag, 0);
		ap->blkno = args->fsbno = XFS_AGB_TO_FSB(mp, ag, 0);


	return 0;
	return 0;
}
}
@@ -2376,9 +2376,9 @@ xfs_bmap_btalloc(
	if (unlikely(align)) {
	if (unlikely(align)) {
		error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
		error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
						align, 0, ap->eof, 0, ap->conv,
						align, 0, ap->eof, 0, ap->conv,
						&ap->off, &ap->alen);
						&ap->offset, &ap->length);
		ASSERT(!error);
		ASSERT(!error);
		ASSERT(ap->alen);
		ASSERT(ap->length);
	}
	}
	nullfb = *ap->firstblock == NULLFSBLOCK;
	nullfb = *ap->firstblock == NULLFSBLOCK;
	fb_agno = nullfb ? NULLAGNUMBER : XFS_FSB_TO_AGNO(mp, *ap->firstblock);
	fb_agno = nullfb ? NULLAGNUMBER : XFS_FSB_TO_AGNO(mp, *ap->firstblock);
@@ -2386,33 +2386,33 @@ xfs_bmap_btalloc(
		if (ap->userdata && xfs_inode_is_filestream(ap->ip)) {
		if (ap->userdata && xfs_inode_is_filestream(ap->ip)) {
			ag = xfs_filestream_lookup_ag(ap->ip);
			ag = xfs_filestream_lookup_ag(ap->ip);
			ag = (ag != NULLAGNUMBER) ? ag : 0;
			ag = (ag != NULLAGNUMBER) ? ag : 0;
			ap->rval = XFS_AGB_TO_FSB(mp, ag, 0);
			ap->blkno = XFS_AGB_TO_FSB(mp, ag, 0);
		} else {
		} else {
			ap->rval = XFS_INO_TO_FSB(mp, ap->ip->i_ino);
			ap->blkno = XFS_INO_TO_FSB(mp, ap->ip->i_ino);
		}
		}
	} else
	} else
		ap->rval = *ap->firstblock;
		ap->blkno = *ap->firstblock;


	xfs_bmap_adjacent(ap);
	xfs_bmap_adjacent(ap);


	/*
	/*
	 * If allowed, use ap->rval; otherwise must use firstblock since
	 * If allowed, use ap->blkno; otherwise must use firstblock since
	 * it's in the right allocation group.
	 * it's in the right allocation group.
	 */
	 */
	if (nullfb || XFS_FSB_TO_AGNO(mp, ap->rval) == fb_agno)
	if (nullfb || XFS_FSB_TO_AGNO(mp, ap->blkno) == fb_agno)
		;
		;
	else
	else
		ap->rval = *ap->firstblock;
		ap->blkno = *ap->firstblock;
	/*
	/*
	 * Normal allocation, done through xfs_alloc_vextent.
	 * Normal allocation, done through xfs_alloc_vextent.
	 */
	 */
	tryagain = isaligned = 0;
	tryagain = isaligned = 0;
	args.tp = ap->tp;
	args.tp = ap->tp;
	args.mp = mp;
	args.mp = mp;
	args.fsbno = ap->rval;
	args.fsbno = ap->blkno;


	/* Trim the allocation back to the maximum an AG can fit. */
	/* Trim the allocation back to the maximum an AG can fit. */
	args.maxlen = MIN(ap->alen, XFS_ALLOC_AG_MAX_USABLE(mp));
	args.maxlen = MIN(ap->length, XFS_ALLOC_AG_MAX_USABLE(mp));
	args.firstblock = *ap->firstblock;
	args.firstblock = *ap->firstblock;
	blen = 0;
	blen = 0;
	if (nullfb) {
	if (nullfb) {
@@ -2433,14 +2433,14 @@ xfs_bmap_btalloc(
	/* apply extent size hints if obtained earlier */
	/* apply extent size hints if obtained earlier */
	if (unlikely(align)) {
	if (unlikely(align)) {
		args.prod = align;
		args.prod = align;
		if ((args.mod = (xfs_extlen_t)do_mod(ap->off, args.prod)))
		if ((args.mod = (xfs_extlen_t)do_mod(ap->offset, args.prod)))
			args.mod = (xfs_extlen_t)(args.prod - args.mod);
			args.mod = (xfs_extlen_t)(args.prod - args.mod);
	} else if (mp->m_sb.sb_blocksize >= PAGE_CACHE_SIZE) {
	} else if (mp->m_sb.sb_blocksize >= PAGE_CACHE_SIZE) {
		args.prod = 1;
		args.prod = 1;
		args.mod = 0;
		args.mod = 0;
	} else {
	} else {
		args.prod = PAGE_CACHE_SIZE >> mp->m_sb.sb_blocklog;
		args.prod = PAGE_CACHE_SIZE >> mp->m_sb.sb_blocklog;
		if ((args.mod = (xfs_extlen_t)(do_mod(ap->off, args.prod))))
		if ((args.mod = (xfs_extlen_t)(do_mod(ap->offset, args.prod))))
			args.mod = (xfs_extlen_t)(args.prod - args.mod);
			args.mod = (xfs_extlen_t)(args.prod - args.mod);
	}
	}
	/*
	/*
@@ -2453,7 +2453,7 @@ xfs_bmap_btalloc(
	 * at the end of file.
	 * at the end of file.
	 */
	 */
	if (!ap->flist->xbf_low && ap->aeof) {
	if (!ap->flist->xbf_low && ap->aeof) {
		if (!ap->off) {
		if (!ap->offset) {
			args.alignment = mp->m_dalign;
			args.alignment = mp->m_dalign;
			atype = args.type;
			atype = args.type;
			isaligned = 1;
			isaligned = 1;
@@ -2506,7 +2506,7 @@ xfs_bmap_btalloc(
		 * turned on.
		 * turned on.
		 */
		 */
		args.type = atype;
		args.type = atype;
		args.fsbno = ap->rval;
		args.fsbno = ap->blkno;
		args.alignment = mp->m_dalign;
		args.alignment = mp->m_dalign;
		args.minlen = nextminlen;
		args.minlen = nextminlen;
		args.minalignslop = 0;
		args.minalignslop = 0;
@@ -2520,7 +2520,7 @@ xfs_bmap_btalloc(
		 * try again.
		 * try again.
		 */
		 */
		args.type = atype;
		args.type = atype;
		args.fsbno = ap->rval;
		args.fsbno = ap->blkno;
		args.alignment = 0;
		args.alignment = 0;
		if ((error = xfs_alloc_vextent(&args)))
		if ((error = xfs_alloc_vextent(&args)))
			return error;
			return error;
@@ -2529,7 +2529,7 @@ xfs_bmap_btalloc(
	    args.minlen > ap->minlen) {
	    args.minlen > ap->minlen) {
		args.minlen = ap->minlen;
		args.minlen = ap->minlen;
		args.type = XFS_ALLOCTYPE_START_BNO;
		args.type = XFS_ALLOCTYPE_START_BNO;
		args.fsbno = ap->rval;
		args.fsbno = ap->blkno;
		if ((error = xfs_alloc_vextent(&args)))
		if ((error = xfs_alloc_vextent(&args)))
			return error;
			return error;
	}
	}
@@ -2554,12 +2554,12 @@ xfs_bmap_btalloc(
			XFS_FSB_TO_AGNO(mp, *ap->firstblock) <
			XFS_FSB_TO_AGNO(mp, *ap->firstblock) <
			XFS_FSB_TO_AGNO(mp, args.fsbno)));
			XFS_FSB_TO_AGNO(mp, args.fsbno)));


		ap->rval = args.fsbno;
		ap->blkno = args.fsbno;
		if (*ap->firstblock == NULLFSBLOCK)
		if (*ap->firstblock == NULLFSBLOCK)
			*ap->firstblock = args.fsbno;
			*ap->firstblock = args.fsbno;
		ASSERT(nullfb || fb_agno == args.agno ||
		ASSERT(nullfb || fb_agno == args.agno ||
		       (ap->flist->xbf_low && fb_agno < args.agno));
		       (ap->flist->xbf_low && fb_agno < args.agno));
		ap->alen = args.len;
		ap->length = args.len;
		ap->ip->i_d.di_nblocks += args.len;
		ap->ip->i_d.di_nblocks += args.len;
		xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
		xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE);
		if (ap->wasdel)
		if (ap->wasdel)
@@ -2573,8 +2573,8 @@ xfs_bmap_btalloc(
					XFS_TRANS_DQ_BCOUNT,
					XFS_TRANS_DQ_BCOUNT,
			(long) args.len);
			(long) args.len);
	} else {
	} else {
		ap->rval = NULLFSBLOCK;
		ap->blkno = NULLFSBLOCK;
		ap->alen = 0;
		ap->length = 0;
	}
	}
	return 0;
	return 0;
}
}
@@ -3902,8 +3902,8 @@ xfs_bmap_isaeof(
	 * Check if we are allocation or past the last extent, or at least into
	 * Check if we are allocation or past the last extent, or at least into
	 * the last delayed allocated extent.
	 * the last delayed allocated extent.
	 */
	 */
	bma->aeof = bma->off >= rec.br_startoff + rec.br_blockcount ||
	bma->aeof = bma->offset >= rec.br_startoff + rec.br_blockcount ||
		(bma->off >= rec.br_startoff &&
		(bma->offset >= rec.br_startoff &&
		 isnullstartblock(rec.br_startblock));
		 isnullstartblock(rec.br_startblock));
	return 0;
	return 0;
}
}
@@ -4637,11 +4637,11 @@ xfs_bmapi_allocate(
					 &bma->prev);
					 &bma->prev);
		}
		}
	} else {
	} else {
		alen = (xfs_extlen_t)XFS_FILBLKS_MIN(bma->alen, MAXEXTLEN);
		alen = (xfs_extlen_t)XFS_FILBLKS_MIN(bma->length, MAXEXTLEN);
		if (!bma->eof)
		if (!bma->eof)
			alen = (xfs_extlen_t)XFS_FILBLKS_MIN(alen,
			alen = (xfs_extlen_t)XFS_FILBLKS_MIN(alen,
					bma->got.br_startoff - bma->off);
					bma->got.br_startoff - bma->offset);
		aoff = bma->off;
		aoff = bma->offset;
	}
	}


	/*
	/*
@@ -4656,8 +4656,8 @@ xfs_bmapi_allocate(
	/*
	/*
	 * Fill in changeable bma fields.
	 * Fill in changeable bma fields.
	 */
	 */
	bma->alen = alen;
	bma->length = alen;
	bma->off = aoff;
	bma->offset = aoff;
	bma->minlen = (flags & XFS_BMAPI_CONTIG) ? alen : 1;
	bma->minlen = (flags & XFS_BMAPI_CONTIG) ? alen : 1;
	bma->aeof = 0;
	bma->aeof = 0;


@@ -4679,9 +4679,9 @@ xfs_bmapi_allocate(
	/*
	/*
	 * Copy out result fields.
	 * Copy out result fields.
	 */
	 */
	abno = bma->rval;
	abno = bma->blkno;
	alen = bma->alen;
	alen = bma->length;
	aoff = bma->off;
	aoff = bma->offset;
	if (bma->flist->xbf_low)
	if (bma->flist->xbf_low)
		bma->minleft = 0;
		bma->minleft = 0;
	if (*cur)
	if (*cur)
@@ -4939,15 +4939,15 @@ xfs_bmapi_write(
			bma.eof = eof;
			bma.eof = eof;
			bma.conv = !!(flags & XFS_BMAPI_CONVERT);
			bma.conv = !!(flags & XFS_BMAPI_CONVERT);
			bma.wasdel = wasdelay;
			bma.wasdel = wasdelay;
			bma.alen = len;
			bma.length = len;
			bma.off = bno;
			bma.offset = bno;


			error = xfs_bmapi_allocate(&bma, &lastx, &cur, flags,
			error = xfs_bmapi_allocate(&bma, &lastx, &cur, flags,
					&nallocs, &tmp_logflags);
					&nallocs, &tmp_logflags);
			logflags |= tmp_logflags;
			logflags |= tmp_logflags;
			if (error)
			if (error)
				goto error0;
				goto error0;
			if (bma.rval == NULLFSBLOCK)
			if (bma.blkno == NULLFSBLOCK)
				break;
				break;
		}
		}


+5 −3
Original line number Original line Diff line number Diff line
@@ -111,13 +111,15 @@ static inline void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp)
typedef struct xfs_bmalloca {
typedef struct xfs_bmalloca {
	xfs_fsblock_t		*firstblock; /* i/o first block allocated */
	xfs_fsblock_t		*firstblock; /* i/o first block allocated */
	struct xfs_bmap_free	*flist;	/* bmap freelist */
	struct xfs_bmap_free	*flist;	/* bmap freelist */
	xfs_fsblock_t		rval;	/* starting block of new extent */
	xfs_fileoff_t		off;	/* offset in file filling in */
	struct xfs_trans	*tp;	/* transaction pointer */
	struct xfs_trans	*tp;	/* transaction pointer */
	struct xfs_inode	*ip;	/* incore inode pointer */
	struct xfs_inode	*ip;	/* incore inode pointer */
	struct xfs_bmbt_irec	prev;	/* extent before the new one */
	struct xfs_bmbt_irec	prev;	/* extent before the new one */
	struct xfs_bmbt_irec	got;	/* extent after, or delayed */
	struct xfs_bmbt_irec	got;	/* extent after, or delayed */
	xfs_extlen_t		alen;	/* i/o length asked/allocated */

	xfs_fileoff_t		offset;	/* offset in file filling in */
	xfs_extlen_t		length;	/* i/o length asked/allocated */
	xfs_fsblock_t		blkno;	/* starting block of new extent */

	xfs_extlen_t		total;	/* total blocks needed for xaction */
	xfs_extlen_t		total;	/* total blocks needed for xaction */
	xfs_extlen_t		minlen;	/* minimum allocation size (blocks) */
	xfs_extlen_t		minlen;	/* minimum allocation size (blocks) */
	xfs_extlen_t		minleft; /* amount must be left after alloc */
	xfs_extlen_t		minleft; /* amount must be left after alloc */
+1 −1
Original line number Original line Diff line number Diff line
@@ -682,7 +682,7 @@ xfs_filestream_new_ag(
	ip = ap->ip;
	ip = ap->ip;
	mp = ip->i_mount;
	mp = ip->i_mount;
	cache = mp->m_filestream;
	cache = mp->m_filestream;
	minlen = ap->alen;
	minlen = ap->length;
	*agp = NULLAGNUMBER;
	*agp = NULLAGNUMBER;


	/*
	/*