diff options
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
| -rw-r--r-- | fs/xfs/xfs_bmap.c | 217 | 
1 files changed, 18 insertions, 199 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 598a30ba314..d74fbec8062 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -101,7 +101,6 @@ xfs_bmap_add_extent(  	xfs_fsblock_t		*first,	/* pointer to firstblock variable */  	xfs_bmap_free_t		*flist,	/* list of extents to be freed */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			whichfork, /* data or attr fork */  	int			rsvd);	/* OK to allocate reserved blocks */ @@ -119,7 +118,6 @@ xfs_bmap_add_extent_delay_real(  	xfs_fsblock_t		*first,	/* pointer to firstblock variable */  	xfs_bmap_free_t		*flist,	/* list of extents to be freed */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			rsvd);	/* OK to allocate reserved blocks */  /* @@ -132,7 +130,6 @@ xfs_bmap_add_extent_hole_delay(  	xfs_extnum_t		idx,	/* extent number to update/insert */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */  	int			*logflagsp,/* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			rsvd);	/* OK to allocate reserved blocks */  /* @@ -146,7 +143,6 @@ xfs_bmap_add_extent_hole_real(  	xfs_btree_cur_t		*cur,	/* if null, not a btree */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			whichfork); /* data or attr fork */  /* @@ -159,8 +155,7 @@ xfs_bmap_add_extent_unwritten_real(  	xfs_extnum_t		idx,	/* extent number to update/insert */  	xfs_btree_cur_t		**curp,	/* if *curp is null, not a btree */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */ -	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta); /* Change made to incore extents */ +	int			*logflagsp); /* inode logging flags */  /*   * xfs_bmap_alloc is called by xfs_bmapi to allocate an extent for a file. @@ -197,7 +192,6 @@ xfs_bmap_del_extent(  	xfs_btree_cur_t		*cur,	/* if null, not a btree */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */  	int			*logflagsp,/* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			whichfork, /* data or attr fork */  	int			rsvd);	 /* OK to allocate reserved blocks */ @@ -486,7 +480,6 @@ xfs_bmap_add_extent(  	xfs_fsblock_t		*first,	/* pointer to firstblock variable */  	xfs_bmap_free_t		*flist,	/* list of extents to be freed */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			whichfork, /* data or attr fork */  	int			rsvd)	/* OK to use reserved data blocks */  { @@ -521,15 +514,6 @@ xfs_bmap_add_extent(  			logflags = XFS_ILOG_CORE | xfs_ilog_fext(whichfork);  		} else  			logflags = 0; -		/* DELTA: single new extent */ -		if (delta) { -			if (delta->xed_startoff > new->br_startoff) -				delta->xed_startoff = new->br_startoff; -			if (delta->xed_blockcount < -					new->br_startoff + new->br_blockcount) -				delta->xed_blockcount = new->br_startoff + -						new->br_blockcount; -		}  	}  	/*  	 * Any kind of new delayed allocation goes here. @@ -539,7 +523,7 @@ xfs_bmap_add_extent(  			ASSERT((cur->bc_private.b.flags &  				XFS_BTCUR_BPRV_WASDEL) == 0);  		if ((error = xfs_bmap_add_extent_hole_delay(ip, idx, new, -				&logflags, delta, rsvd))) +				&logflags, rsvd)))  			goto done;  	}  	/* @@ -550,7 +534,7 @@ xfs_bmap_add_extent(  			ASSERT((cur->bc_private.b.flags &  				XFS_BTCUR_BPRV_WASDEL) == 0);  		if ((error = xfs_bmap_add_extent_hole_real(ip, idx, cur, new, -				&logflags, delta, whichfork))) +				&logflags, whichfork)))  			goto done;  	} else {  		xfs_bmbt_irec_t	prev;	/* old extent at offset idx */ @@ -575,17 +559,17 @@ xfs_bmap_add_extent(  						XFS_BTCUR_BPRV_WASDEL);  				if ((error = xfs_bmap_add_extent_delay_real(ip,  					idx, &cur, new, &da_new, first, flist, -					&logflags, delta, rsvd))) +					&logflags, rsvd)))  					goto done;  			} else if (new->br_state == XFS_EXT_NORM) {  				ASSERT(new->br_state == XFS_EXT_NORM);  				if ((error = xfs_bmap_add_extent_unwritten_real( -					ip, idx, &cur, new, &logflags, delta))) +					ip, idx, &cur, new, &logflags)))  					goto done;  			} else {  				ASSERT(new->br_state == XFS_EXT_UNWRITTEN);  				if ((error = xfs_bmap_add_extent_unwritten_real( -					ip, idx, &cur, new, &logflags, delta))) +					ip, idx, &cur, new, &logflags)))  					goto done;  			}  			ASSERT(*curp == cur || *curp == NULL); @@ -598,7 +582,7 @@ xfs_bmap_add_extent(  				ASSERT((cur->bc_private.b.flags &  					XFS_BTCUR_BPRV_WASDEL) == 0);  			if ((error = xfs_bmap_add_extent_hole_real(ip, idx, cur, -					new, &logflags, delta, whichfork))) +					new, &logflags, whichfork)))  				goto done;  		}  	} @@ -663,7 +647,6 @@ xfs_bmap_add_extent_delay_real(  	xfs_fsblock_t		*first,	/* pointer to firstblock variable */  	xfs_bmap_free_t		*flist,	/* list of extents to be freed */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			rsvd)	/* OK to use reserved data block allocation */  {  	xfs_btree_cur_t		*cur;	/* btree cursor */ @@ -794,11 +777,6 @@ xfs_bmap_add_extent_delay_real(  				goto done;  		}  		*dnew = 0; -		/* DELTA: Three in-core extents are replaced by one. */ -		temp = LEFT.br_startoff; -		temp2 = LEFT.br_blockcount + -			PREV.br_blockcount + -			RIGHT.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING | BMAP_LEFT_CONTIG: @@ -829,10 +807,6 @@ xfs_bmap_add_extent_delay_real(  				goto done;  		}  		*dnew = 0; -		/* DELTA: Two in-core extents are replaced by one. */ -		temp = LEFT.br_startoff; -		temp2 = LEFT.br_blockcount + -			PREV.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING | BMAP_RIGHT_CONTIG: @@ -864,10 +838,6 @@ xfs_bmap_add_extent_delay_real(  				goto done;  		}  		*dnew = 0; -		/* DELTA: Two in-core extents are replaced by one. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount + -			RIGHT.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING: @@ -897,9 +867,6 @@ xfs_bmap_add_extent_delay_real(  			XFS_WANT_CORRUPTED_GOTO(i == 1, done);  		}  		*dnew = 0; -		/* DELTA: The in-core extent described by new changed type. */ -		temp = new->br_startoff; -		temp2 = new->br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_LEFT_CONTIG: @@ -939,10 +906,6 @@ xfs_bmap_add_extent_delay_real(  		xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));  		trace_xfs_bmap_post_update(ip, idx, state, _THIS_IP_);  		*dnew = temp; -		/* DELTA: The boundary between two in-core extents moved. */ -		temp = LEFT.br_startoff; -		temp2 = LEFT.br_blockcount + -			PREV.br_blockcount;  		break;  	case BMAP_LEFT_FILLING: @@ -987,9 +950,6 @@ xfs_bmap_add_extent_delay_real(  		xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));  		trace_xfs_bmap_post_update(ip, idx + 1, state, _THIS_IP_);  		*dnew = temp; -		/* DELTA: One in-core extent is split in two. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount;  		break;  	case BMAP_RIGHT_FILLING | BMAP_RIGHT_CONTIG: @@ -1028,10 +988,6 @@ xfs_bmap_add_extent_delay_real(  		xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));  		trace_xfs_bmap_post_update(ip, idx, state, _THIS_IP_);  		*dnew = temp; -		/* DELTA: The boundary between two in-core extents moved. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount + -			RIGHT.br_blockcount;  		break;  	case BMAP_RIGHT_FILLING: @@ -1075,9 +1031,6 @@ xfs_bmap_add_extent_delay_real(  		xfs_bmbt_set_startblock(ep, nullstartblock((int)temp));  		trace_xfs_bmap_post_update(ip, idx, state, _THIS_IP_);  		*dnew = temp; -		/* DELTA: One in-core extent is split in two. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount;  		break;  	case 0: @@ -1158,9 +1111,6 @@ xfs_bmap_add_extent_delay_real(  			nullstartblock((int)temp2));  		trace_xfs_bmap_post_update(ip, idx + 2, state, _THIS_IP_);  		*dnew = temp + temp2; -		/* DELTA: One in-core extent is split in three. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG: @@ -1176,13 +1126,6 @@ xfs_bmap_add_extent_delay_real(  		ASSERT(0);  	}  	*curp = cur; -	if (delta) { -		temp2 += temp; -		if (delta->xed_startoff > temp) -			delta->xed_startoff = temp; -		if (delta->xed_blockcount < temp2) -			delta->xed_blockcount = temp2; -	}  done:  	*logflagsp = rval;  	return error; @@ -1201,8 +1144,7 @@ xfs_bmap_add_extent_unwritten_real(  	xfs_extnum_t		idx,	/* extent number to update/insert */  	xfs_btree_cur_t		**curp,	/* if *curp is null, not a btree */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */ -	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta) /* Change made to incore extents */ +	int			*logflagsp) /* inode logging flags */  {  	xfs_btree_cur_t		*cur;	/* btree cursor */  	xfs_bmbt_rec_host_t	*ep;	/* extent entry for idx */ @@ -1216,8 +1158,6 @@ xfs_bmap_add_extent_unwritten_real(  					/* left is 0, right is 1, prev is 2 */  	int			rval=0;	/* return value (logging flags) */  	int			state = 0;/* state bits, accessed thru macros */ -	xfs_filblks_t		temp=0; -	xfs_filblks_t		temp2=0;  #define	LEFT		r[0]  #define	RIGHT		r[1] @@ -1338,11 +1278,6 @@ xfs_bmap_add_extent_unwritten_real(  				RIGHT.br_blockcount, LEFT.br_state)))  				goto done;  		} -		/* DELTA: Three in-core extents are replaced by one. */ -		temp = LEFT.br_startoff; -		temp2 = LEFT.br_blockcount + -			PREV.br_blockcount + -			RIGHT.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING | BMAP_LEFT_CONTIG: @@ -1379,10 +1314,6 @@ xfs_bmap_add_extent_unwritten_real(  				LEFT.br_state)))  				goto done;  		} -		/* DELTA: Two in-core extents are replaced by one. */ -		temp = LEFT.br_startoff; -		temp2 = LEFT.br_blockcount + -			PREV.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING | BMAP_RIGHT_CONTIG: @@ -1419,10 +1350,6 @@ xfs_bmap_add_extent_unwritten_real(  				newext)))  				goto done;  		} -		/* DELTA: Two in-core extents are replaced by one. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount + -			RIGHT.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING: @@ -1450,9 +1377,6 @@ xfs_bmap_add_extent_unwritten_real(  				newext)))  				goto done;  		} -		/* DELTA: The in-core extent described by new changed type. */ -		temp = new->br_startoff; -		temp2 = new->br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_LEFT_CONTIG: @@ -1498,10 +1422,6 @@ xfs_bmap_add_extent_unwritten_real(  				LEFT.br_state))  				goto done;  		} -		/* DELTA: The boundary between two in-core extents moved. */ -		temp = LEFT.br_startoff; -		temp2 = LEFT.br_blockcount + -			PREV.br_blockcount;  		break;  	case BMAP_LEFT_FILLING: @@ -1541,9 +1461,6 @@ xfs_bmap_add_extent_unwritten_real(  				goto done;  			XFS_WANT_CORRUPTED_GOTO(i == 1, done);  		} -		/* DELTA: One in-core extent is split in two. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount;  		break;  	case BMAP_RIGHT_FILLING | BMAP_RIGHT_CONTIG: @@ -1584,10 +1501,6 @@ xfs_bmap_add_extent_unwritten_real(  				newext)))  				goto done;  		} -		/* DELTA: The boundary between two in-core extents moved. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount + -			RIGHT.br_blockcount;  		break;  	case BMAP_RIGHT_FILLING: @@ -1627,9 +1540,6 @@ xfs_bmap_add_extent_unwritten_real(  				goto done;  			XFS_WANT_CORRUPTED_GOTO(i == 1, done);  		} -		/* DELTA: One in-core extent is split in two. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount;  		break;  	case 0: @@ -1689,9 +1599,6 @@ xfs_bmap_add_extent_unwritten_real(  				goto done;  			XFS_WANT_CORRUPTED_GOTO(i == 1, done);  		} -		/* DELTA: One in-core extent is split in three. */ -		temp = PREV.br_startoff; -		temp2 = PREV.br_blockcount;  		break;  	case BMAP_LEFT_FILLING | BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG: @@ -1707,13 +1614,6 @@ xfs_bmap_add_extent_unwritten_real(  		ASSERT(0);  	}  	*curp = cur; -	if (delta) { -		temp2 += temp; -		if (delta->xed_startoff > temp) -			delta->xed_startoff = temp; -		if (delta->xed_blockcount < temp2) -			delta->xed_blockcount = temp2; -	}  done:  	*logflagsp = rval;  	return error; @@ -1733,7 +1633,6 @@ xfs_bmap_add_extent_hole_delay(  	xfs_extnum_t		idx,	/* extent number to update/insert */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			rsvd)		/* OK to allocate reserved blocks */  {  	xfs_bmbt_rec_host_t	*ep;	/* extent record for idx */ @@ -1744,7 +1643,6 @@ xfs_bmap_add_extent_hole_delay(  	xfs_bmbt_irec_t		right;	/* right neighbor extent entry */  	int			state;  /* state bits, accessed thru macros */  	xfs_filblks_t		temp=0;	/* temp for indirect calculations */ -	xfs_filblks_t		temp2=0;  	ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK);  	ep = xfs_iext_get_ext(ifp, idx); @@ -1816,9 +1714,6 @@ xfs_bmap_add_extent_hole_delay(  		xfs_iext_remove(ip, idx, 1, state);  		ip->i_df.if_lastex = idx - 1; -		/* DELTA: Two in-core extents were replaced by one. */ -		temp2 = temp; -		temp = left.br_startoff;  		break;  	case BMAP_LEFT_CONTIG: @@ -1838,9 +1733,6 @@ xfs_bmap_add_extent_hole_delay(  		trace_xfs_bmap_post_update(ip, idx - 1, state, _THIS_IP_);  		ip->i_df.if_lastex = idx - 1; -		/* DELTA: One in-core extent grew into a hole. */ -		temp2 = temp; -		temp = left.br_startoff;  		break;  	case BMAP_RIGHT_CONTIG: @@ -1859,9 +1751,6 @@ xfs_bmap_add_extent_hole_delay(  		trace_xfs_bmap_post_update(ip, idx, state, _THIS_IP_);  		ip->i_df.if_lastex = idx; -		/* DELTA: One in-core extent grew into a hole. */ -		temp2 = temp; -		temp = new->br_startoff;  		break;  	case 0: @@ -1873,9 +1762,6 @@ xfs_bmap_add_extent_hole_delay(  		oldlen = newlen = 0;  		xfs_iext_insert(ip, idx, 1, new, state);  		ip->i_df.if_lastex = idx; -		/* DELTA: A new in-core extent was added in a hole. */ -		temp2 = new->br_blockcount; -		temp = new->br_startoff;  		break;  	}  	if (oldlen != newlen) { @@ -1886,13 +1772,6 @@ xfs_bmap_add_extent_hole_delay(  		 * Nothing to do for disk quota accounting here.  		 */  	} -	if (delta) { -		temp2 += temp; -		if (delta->xed_startoff > temp) -			delta->xed_startoff = temp; -		if (delta->xed_blockcount < temp2) -			delta->xed_blockcount = temp2; -	}  	*logflagsp = 0;  	return 0;  } @@ -1908,7 +1787,6 @@ xfs_bmap_add_extent_hole_real(  	xfs_btree_cur_t		*cur,	/* if null, not a btree */  	xfs_bmbt_irec_t		*new,	/* new data to add to file extents */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			whichfork) /* data or attr fork */  {  	xfs_bmbt_rec_host_t	*ep;	/* pointer to extent entry ins. point */ @@ -1919,8 +1797,6 @@ xfs_bmap_add_extent_hole_real(  	xfs_bmbt_irec_t		right;	/* right neighbor extent entry */  	int			rval=0;	/* return value (logging flags) */  	int			state;	/* state bits, accessed thru macros */ -	xfs_filblks_t		temp=0; -	xfs_filblks_t		temp2=0;  	ifp = XFS_IFORK_PTR(ip, whichfork);  	ASSERT(idx <= ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t)); @@ -2017,11 +1893,6 @@ xfs_bmap_add_extent_hole_real(  					left.br_state)))  				goto done;  		} -		/* DELTA: Two in-core extents were replaced by one. */ -		temp = left.br_startoff; -		temp2 = left.br_blockcount + -			new->br_blockcount + -			right.br_blockcount;  		break;  	case BMAP_LEFT_CONTIG: @@ -2053,10 +1924,6 @@ xfs_bmap_add_extent_hole_real(  					left.br_state)))  				goto done;  		} -		/* DELTA: One in-core extent grew. */ -		temp = left.br_startoff; -		temp2 = left.br_blockcount + -			new->br_blockcount;  		break;  	case BMAP_RIGHT_CONTIG: @@ -2089,10 +1956,6 @@ xfs_bmap_add_extent_hole_real(  					right.br_state)))  				goto done;  		} -		/* DELTA: One in-core extent grew. */ -		temp = new->br_startoff; -		temp2 = new->br_blockcount + -			right.br_blockcount;  		break;  	case 0: @@ -2120,18 +1983,8 @@ xfs_bmap_add_extent_hole_real(  				goto done;  			XFS_WANT_CORRUPTED_GOTO(i == 1, done);  		} -		/* DELTA: A new extent was added in a hole. */ -		temp = new->br_startoff; -		temp2 = new->br_blockcount;  		break;  	} -	if (delta) { -		temp2 += temp; -		if (delta->xed_startoff > temp) -			delta->xed_startoff = temp; -		if (delta->xed_blockcount < temp2) -			delta->xed_blockcount = temp2; -	}  done:  	*logflagsp = rval;  	return error; @@ -2956,7 +2809,6 @@ xfs_bmap_del_extent(  	xfs_btree_cur_t		*cur,	/* if null, not a btree */  	xfs_bmbt_irec_t		*del,	/* data to remove from extents */  	int			*logflagsp, /* inode logging flags */ -	xfs_extdelta_t		*delta, /* Change made to incore extents */  	int			whichfork, /* data or attr fork */  	int			rsvd)	/* OK to allocate reserved blocks */  { @@ -3262,14 +3114,6 @@ xfs_bmap_del_extent(  	if (da_old > da_new)  		xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int64_t)(da_old - da_new),  			rsvd); -	if (delta) { -		/* DELTA: report the original extent. */ -		if (delta->xed_startoff > got.br_startoff) -			delta->xed_startoff = got.br_startoff; -		if (delta->xed_blockcount < got.br_startoff+got.br_blockcount) -			delta->xed_blockcount = got.br_startoff + -							got.br_blockcount; -	}  done:  	*logflagsp = flags;  	return error; @@ -4481,8 +4325,7 @@ xfs_bmapi(  	xfs_extlen_t	total,		/* total blocks needed */  	xfs_bmbt_irec_t	*mval,		/* output: map values */  	int		*nmap,		/* i/o: mval size/count */ -	xfs_bmap_free_t	*flist,		/* i/o: list extents to free */ -	xfs_extdelta_t	*delta)		/* o: change made to incore extents */ +	xfs_bmap_free_t	*flist)		/* i/o: list extents to free */  {  	xfs_fsblock_t	abno;		/* allocated block number */  	xfs_extlen_t	alen;		/* allocated extent length */ @@ -4594,10 +4437,7 @@ xfs_bmapi(  	end = bno + len;  	obno = bno;  	bma.ip = NULL; -	if (delta) { -		delta->xed_startoff = NULLFILEOFF; -		delta->xed_blockcount = 0; -	} +  	while (bno < end && n < *nmap) {  		/*  		 * Reading past eof, act as though there's a hole @@ -4823,7 +4663,7 @@ xfs_bmapi(  					got.br_state = XFS_EXT_UNWRITTEN;  			}  			error = xfs_bmap_add_extent(ip, lastx, &cur, &got, -				firstblock, flist, &tmp_logflags, delta, +				firstblock, flist, &tmp_logflags,  				whichfork, (flags & XFS_BMAPI_RSVBLOCKS));  			logflags |= tmp_logflags;  			if (error) @@ -4919,7 +4759,7 @@ xfs_bmapi(  			}  			mval->br_state = XFS_EXT_NORM;  			error = xfs_bmap_add_extent(ip, lastx, &cur, mval, -				firstblock, flist, &tmp_logflags, delta, +				firstblock, flist, &tmp_logflags,  				whichfork, (flags & XFS_BMAPI_RSVBLOCKS));  			logflags |= tmp_logflags;  			if (error) @@ -5009,14 +4849,6 @@ xfs_bmapi(  	ASSERT(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE ||  	       XFS_IFORK_NEXTENTS(ip, whichfork) > ifp->if_ext_max);  	error = 0; -	if (delta && delta->xed_startoff != NULLFILEOFF) { -		/* A change was actually made. -		 * Note that delta->xed_blockount is an offset at this -		 * point and needs to be converted to a block count. -		 */ -		ASSERT(delta->xed_blockcount > delta->xed_startoff); -		delta->xed_blockcount -= delta->xed_startoff; -	}  error0:  	/*  	 * Log everything.  Do this after conversion, there's no point in @@ -5128,8 +4960,6 @@ xfs_bunmapi(  	xfs_fsblock_t		*firstblock,	/* first allocated block  						   controls a.g. for allocs */  	xfs_bmap_free_t		*flist,		/* i/o: list extents to free */ -	xfs_extdelta_t		*delta,		/* o: change made to incore -						   extents */  	int			*done)		/* set if not done yet */  {  	xfs_btree_cur_t		*cur;		/* bmap btree cursor */ @@ -5188,10 +5018,7 @@ xfs_bunmapi(  	bno = start + len - 1;  	ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got,  		&prev); -	if (delta) { -		delta->xed_startoff = NULLFILEOFF; -		delta->xed_blockcount = 0; -	} +  	/*  	 * Check to see if the given block number is past the end of the  	 * file, back up to the last block if so... @@ -5289,7 +5116,7 @@ xfs_bunmapi(  			}  			del.br_state = XFS_EXT_UNWRITTEN;  			error = xfs_bmap_add_extent(ip, lastx, &cur, &del, -				firstblock, flist, &logflags, delta, +				firstblock, flist, &logflags,  				XFS_DATA_FORK, 0);  			if (error)  				goto error0; @@ -5344,7 +5171,7 @@ xfs_bunmapi(  				prev.br_state = XFS_EXT_UNWRITTEN;  				error = xfs_bmap_add_extent(ip, lastx - 1, &cur,  					&prev, firstblock, flist, &logflags, -					delta, XFS_DATA_FORK, 0); +					XFS_DATA_FORK, 0);  				if (error)  					goto error0;  				goto nodelete; @@ -5353,7 +5180,7 @@ xfs_bunmapi(  				del.br_state = XFS_EXT_UNWRITTEN;  				error = xfs_bmap_add_extent(ip, lastx, &cur,  					&del, firstblock, flist, &logflags, -					delta, XFS_DATA_FORK, 0); +					XFS_DATA_FORK, 0);  				if (error)  					goto error0;  				goto nodelete; @@ -5406,7 +5233,7 @@ xfs_bunmapi(  			goto error0;  		}  		error = xfs_bmap_del_extent(ip, tp, lastx, flist, cur, &del, -				&tmp_logflags, delta, whichfork, rsvd); +				&tmp_logflags, whichfork, rsvd);  		logflags |= tmp_logflags;  		if (error)  			goto error0; @@ -5463,14 +5290,6 @@ nodelete:  	ASSERT(ifp->if_ext_max ==  	       XFS_IFORK_SIZE(ip, whichfork) / (uint)sizeof(xfs_bmbt_rec_t));  	error = 0; -	if (delta && delta->xed_startoff != NULLFILEOFF) { -		/* A change was actually made. -		 * Note that delta->xed_blockount is an offset at this -		 * point and needs to be converted to a block count. -		 */ -		ASSERT(delta->xed_blockcount > delta->xed_startoff); -		delta->xed_blockcount -= delta->xed_startoff; -	}  error0:  	/*  	 * Log everything.  Do this after conversion, there's no point in @@ -5683,7 +5502,7 @@ xfs_getbmap(  		error = xfs_bmapi(NULL, ip, XFS_BB_TO_FSBT(mp, bmv->bmv_offset),  				  XFS_BB_TO_FSB(mp, bmv->bmv_length),  				  bmapi_flags, NULL, 0, map, &nmap, -				  NULL, NULL); +				  NULL);  		if (error)  			goto out_free_map;  		ASSERT(nmap <= subnex);  |