diff options
author | Olaf Weber <olaf@sgi.com> | 2006-06-09 00:48:12 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-09 00:48:12 -0400 |
commit | 3e57ecf640428c01ba1ed8c8fc538447ada1715b (patch) | |
tree | bcc92b0017b5ec8e106649cd53beffdd6addde07 /fs/xfs/xfs_da_btree.c | |
parent | 128e6ced247cda88f96fa9f2e4ba8b2c4a681560 (diff) |
[XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report
the range spanned by modifications to the in-core extent map. Add
XFS_BUNMAPI() and XFS_SWAP_EXTENTS() macros that call xfs_bunmapi() and
xfs_swap_extents() via the ioops vector. Change all calls that may modify
the in-core extent map for the data fork to go through the ioops vector.
This allows a cache of extent map data to be kept in sync.
SGI-PV: 947615
SGI-Modid: xfs-linux-melb:xfs-kern:209226a
Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 8988b9051175..47b86f9f69f9 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c | |||
@@ -1655,7 +1655,7 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) | |||
1655 | XFS_BMAPI_AFLAG(w)|XFS_BMAPI_WRITE|XFS_BMAPI_METADATA| | 1655 | XFS_BMAPI_AFLAG(w)|XFS_BMAPI_WRITE|XFS_BMAPI_METADATA| |
1656 | XFS_BMAPI_CONTIG, | 1656 | XFS_BMAPI_CONTIG, |
1657 | args->firstblock, args->total, &map, &nmap, | 1657 | args->firstblock, args->total, &map, &nmap, |
1658 | args->flist))) { | 1658 | args->flist, NULL))) { |
1659 | return error; | 1659 | return error; |
1660 | } | 1660 | } |
1661 | ASSERT(nmap <= 1); | 1661 | ASSERT(nmap <= 1); |
@@ -1676,7 +1676,8 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) | |||
1676 | XFS_BMAPI_AFLAG(w)|XFS_BMAPI_WRITE| | 1676 | XFS_BMAPI_AFLAG(w)|XFS_BMAPI_WRITE| |
1677 | XFS_BMAPI_METADATA, | 1677 | XFS_BMAPI_METADATA, |
1678 | args->firstblock, args->total, | 1678 | args->firstblock, args->total, |
1679 | &mapp[mapi], &nmap, args->flist))) { | 1679 | &mapp[mapi], &nmap, args->flist, |
1680 | NULL))) { | ||
1680 | kmem_free(mapp, sizeof(*mapp) * count); | 1681 | kmem_free(mapp, sizeof(*mapp) * count); |
1681 | return error; | 1682 | return error; |
1682 | } | 1683 | } |
@@ -1961,7 +1962,7 @@ xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, | |||
1961 | */ | 1962 | */ |
1962 | if ((error = xfs_bunmapi(tp, dp, dead_blkno, count, | 1963 | if ((error = xfs_bunmapi(tp, dp, dead_blkno, count, |
1963 | XFS_BMAPI_AFLAG(w)|XFS_BMAPI_METADATA, | 1964 | XFS_BMAPI_AFLAG(w)|XFS_BMAPI_METADATA, |
1964 | 0, args->firstblock, args->flist, | 1965 | 0, args->firstblock, args->flist, NULL, |
1965 | &done)) == ENOSPC) { | 1966 | &done)) == ENOSPC) { |
1966 | if (w != XFS_DATA_FORK) | 1967 | if (w != XFS_DATA_FORK) |
1967 | goto done; | 1968 | goto done; |
@@ -2086,7 +2087,7 @@ xfs_da_do_buf( | |||
2086 | nfsb, | 2087 | nfsb, |
2087 | XFS_BMAPI_METADATA | | 2088 | XFS_BMAPI_METADATA | |
2088 | XFS_BMAPI_AFLAG(whichfork), | 2089 | XFS_BMAPI_AFLAG(whichfork), |
2089 | NULL, 0, mapp, &nmap, NULL))) | 2090 | NULL, 0, mapp, &nmap, NULL, NULL))) |
2090 | goto exit0; | 2091 | goto exit0; |
2091 | } | 2092 | } |
2092 | } else { | 2093 | } else { |