aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr.c
diff options
context:
space:
mode:
authorOlaf Weber <olaf@sgi.com>2006-06-09 00:48:12 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 00:48:12 -0400
commit3e57ecf640428c01ba1ed8c8fc538447ada1715b (patch)
treebcc92b0017b5ec8e106649cd53beffdd6addde07 /fs/xfs/xfs_attr.c
parent128e6ced247cda88f96fa9f2e4ba8b2c4a681560 (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_attr.c')
-rw-r--r--fs/xfs/xfs_attr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index b6e1e02bbb28..3ef41e75d08a 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -1910,7 +1910,7 @@ xfs_attr_rmtval_get(xfs_da_args_t *args)
1910 error = xfs_bmapi(args->trans, args->dp, (xfs_fileoff_t)lblkno, 1910 error = xfs_bmapi(args->trans, args->dp, (xfs_fileoff_t)lblkno,
1911 args->rmtblkcnt, 1911 args->rmtblkcnt,
1912 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, 1912 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
1913 NULL, 0, map, &nmap, NULL); 1913 NULL, 0, map, &nmap, NULL, NULL);
1914 if (error) 1914 if (error)
1915 return(error); 1915 return(error);
1916 ASSERT(nmap >= 1); 1916 ASSERT(nmap >= 1);
@@ -1988,7 +1988,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
1988 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA | 1988 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA |
1989 XFS_BMAPI_WRITE, 1989 XFS_BMAPI_WRITE,
1990 args->firstblock, args->total, &map, &nmap, 1990 args->firstblock, args->total, &map, &nmap,
1991 args->flist); 1991 args->flist, NULL);
1992 if (!error) { 1992 if (!error) {
1993 error = xfs_bmap_finish(&args->trans, args->flist, 1993 error = xfs_bmap_finish(&args->trans, args->flist,
1994 *args->firstblock, &committed); 1994 *args->firstblock, &committed);
@@ -2039,7 +2039,8 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
2039 error = xfs_bmapi(NULL, dp, (xfs_fileoff_t)lblkno, 2039 error = xfs_bmapi(NULL, dp, (xfs_fileoff_t)lblkno,
2040 args->rmtblkcnt, 2040 args->rmtblkcnt,
2041 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, 2041 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
2042 args->firstblock, 0, &map, &nmap, NULL); 2042 args->firstblock, 0, &map, &nmap,
2043 NULL, NULL);
2043 if (error) { 2044 if (error) {
2044 return(error); 2045 return(error);
2045 } 2046 }
@@ -2104,7 +2105,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
2104 args->rmtblkcnt, 2105 args->rmtblkcnt,
2105 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, 2106 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
2106 args->firstblock, 0, &map, &nmap, 2107 args->firstblock, 0, &map, &nmap,
2107 args->flist); 2108 args->flist, NULL);
2108 if (error) { 2109 if (error) {
2109 return(error); 2110 return(error);
2110 } 2111 }
@@ -2142,7 +2143,8 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
2142 XFS_BMAP_INIT(args->flist, args->firstblock); 2143 XFS_BMAP_INIT(args->flist, args->firstblock);
2143 error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt, 2144 error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
2144 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, 2145 XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA,
2145 1, args->firstblock, args->flist, &done); 2146 1, args->firstblock, args->flist,
2147 NULL, &done);
2146 if (!error) { 2148 if (!error) {
2147 error = xfs_bmap_finish(&args->trans, args->flist, 2149 error = xfs_bmap_finish(&args->trans, args->flist,
2148 *args->firstblock, &committed); 2150 *args->firstblock, &committed);