Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269898
b: refs/heads/master
c: 1b16447
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Alex Elder committed Oct 12, 2011
1 parent 5e7564d commit eba5ef9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5bd606ba65f24e5990edfc0e7b52702720ee6fa
refs/heads/master: 1b16447ba24ae39c7fe7133fcdcb4f174dec1901
22 changes: 11 additions & 11 deletions trunk/fs/xfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3867,31 +3867,31 @@ xfs_bmap_last_extent(
* blocks at the end of the file which do not start at the previous data block,
* we will try to align the new blocks at stripe unit boundaries.
*
* Returns 0 in *aeof if the file (fork) is empty as any new write will be at,
* or past the EOF.
* Returns 0 in bma->aeof if the file (fork) is empty as any new write will be
* at, or past the EOF.
*/
STATIC int
xfs_bmap_isaeof(
struct xfs_inode *ip,
xfs_fileoff_t off,
int whichfork,
char *aeof)
struct xfs_bmalloca *bma,
int whichfork)
{
struct xfs_bmbt_irec rec;
int is_empty;
int error;

*aeof = 0;
error = xfs_bmap_last_extent(NULL, ip, whichfork, &rec, &is_empty);
bma->aeof = 0;
error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec,
&is_empty);
if (error || is_empty)
return error;

/*
* Check if we are allocation or past the last extent, or at least into
* the last delayed allocated extent.
*/
*aeof = off >= rec.br_startoff + rec.br_blockcount ||
(off >= rec.br_startoff && isnullstartblock(rec.br_startblock));
bma->aeof = bma->off >= rec.br_startoff + rec.br_blockcount ||
(bma->off >= rec.br_startoff &&
isnullstartblock(rec.br_startblock));
return 0;
}

Expand Down Expand Up @@ -4658,7 +4658,7 @@ xfs_bmapi_allocate(
*/
if (mp->m_dalign && alen >= mp->m_dalign &&
!(flags & XFS_BMAPI_METADATA) && whichfork == XFS_DATA_FORK) {
error = xfs_bmap_isaeof(bma->ip, aoff, whichfork, &bma->aeof);
error = xfs_bmap_isaeof(bma, whichfork);
if (error)
return error;
}
Expand Down

0 comments on commit eba5ef9

Please sign in to comment.