diff options
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 16 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.h | 2 |
2 files changed, 7 insertions, 11 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index c629004d9a4c..f4a65330a2a9 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -4296,15 +4296,14 @@ xfs_bmapi_write( | |||
4296 | bma.datatype = 0; | 4296 | bma.datatype = 0; |
4297 | 4297 | ||
4298 | /* | 4298 | /* |
4299 | * The reval flag means the caller wants to allocate the entire delalloc | 4299 | * The delalloc flag means the caller wants to allocate the entire |
4300 | * extent backing bno where bno may not necessarily match the startoff. | 4300 | * delalloc extent backing bno where bno may not necessarily match the |
4301 | * Now that we've looked up the extent, reset the range to map based on | 4301 | * startoff. Now that we've looked up the extent, reset the range to |
4302 | * the extent in the file. If we're in a hole, this may be an error so | 4302 | * map based on the extent in the file. If we're in a hole, this may be |
4303 | * don't adjust anything. | 4303 | * an error so don't adjust anything. |
4304 | */ | 4304 | */ |
4305 | if ((flags & XFS_BMAPI_REVALRANGE) && | 4305 | if ((flags & XFS_BMAPI_DELALLOC) && |
4306 | !eof && bno >= bma.got.br_startoff) { | 4306 | !eof && bno >= bma.got.br_startoff) { |
4307 | ASSERT(flags & XFS_BMAPI_DELALLOC); | ||
4308 | bno = bma.got.br_startoff; | 4307 | bno = bma.got.br_startoff; |
4309 | len = bma.got.br_blockcount; | 4308 | len = bma.got.br_blockcount; |
4310 | #ifdef DEBUG | 4309 | #ifdef DEBUG |
@@ -4495,10 +4494,9 @@ xfs_bmapi_convert_delalloc( | |||
4495 | flags |= XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC; | 4494 | flags |= XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC; |
4496 | 4495 | ||
4497 | /* | 4496 | /* |
4498 | * The reval flag means to allocate the entire extent; pass a dummy | 4497 | * The delalloc flag means to allocate the entire extent; pass a dummy |
4499 | * length of 1. | 4498 | * length of 1. |
4500 | */ | 4499 | */ |
4501 | flags |= XFS_BMAPI_REVALRANGE; | ||
4502 | error = xfs_bmapi_write(tp, ip, offset_fsb, 1, flags, total, imap, | 4500 | error = xfs_bmapi_write(tp, ip, offset_fsb, 1, flags, total, imap, |
4503 | &nimaps); | 4501 | &nimaps); |
4504 | if (!error && !nimaps) | 4502 | if (!error && !nimaps) |
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h index 75586d56f7a5..4dc7d1a02b35 100644 --- a/fs/xfs/libxfs/xfs_bmap.h +++ b/fs/xfs/libxfs/xfs_bmap.h | |||
@@ -107,8 +107,6 @@ struct xfs_extent_free_item | |||
107 | /* Do not update the rmap btree. Used for reconstructing bmbt from rmapbt. */ | 107 | /* Do not update the rmap btree. Used for reconstructing bmbt from rmapbt. */ |
108 | #define XFS_BMAPI_NORMAP 0x2000 | 108 | #define XFS_BMAPI_NORMAP 0x2000 |
109 | 109 | ||
110 | #define XFS_BMAPI_REVALRANGE 0x4000 | ||
111 | |||
112 | #define XFS_BMAPI_FLAGS \ | 110 | #define XFS_BMAPI_FLAGS \ |
113 | { XFS_BMAPI_ENTIRE, "ENTIRE" }, \ | 111 | { XFS_BMAPI_ENTIRE, "ENTIRE" }, \ |
114 | { XFS_BMAPI_METADATA, "METADATA" }, \ | 112 | { XFS_BMAPI_METADATA, "METADATA" }, \ |