aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iomap.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_iomap.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_iomap.c')
-rw-r--r--fs/xfs/xfs_iomap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index d5dfedcb8922..d79055207fbf 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. 2 * Copyright (c) 2000-2006 Silicon Graphics, Inc.
3 * All Rights Reserved. 3 * All Rights Reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
@@ -252,7 +252,7 @@ xfs_iomap(
252 error = XFS_BMAPI(mp, NULL, io, offset_fsb, 252 error = XFS_BMAPI(mp, NULL, io, offset_fsb,
253 (xfs_filblks_t)(end_fsb - offset_fsb), 253 (xfs_filblks_t)(end_fsb - offset_fsb),
254 bmapi_flags, NULL, 0, &imap, 254 bmapi_flags, NULL, 0, &imap,
255 &nimaps, NULL); 255 &nimaps, NULL, NULL);
256 256
257 if (error) 257 if (error)
258 goto out; 258 goto out;
@@ -519,8 +519,8 @@ xfs_iomap_write_direct(
519 */ 519 */
520 XFS_BMAP_INIT(&free_list, &firstfsb); 520 XFS_BMAP_INIT(&free_list, &firstfsb);
521 nimaps = 1; 521 nimaps = 1;
522 error = xfs_bmapi(tp, ip, offset_fsb, count_fsb, 522 error = XFS_BMAPI(mp, tp, io, offset_fsb, count_fsb, bmapi_flag,
523 bmapi_flag, &firstfsb, 0, &imap, &nimaps, &free_list); 523 &firstfsb, 0, &imap, &nimaps, &free_list, NULL);
524 if (error) 524 if (error)
525 goto error0; 525 goto error0;
526 526
@@ -610,8 +610,8 @@ xfs_iomap_eof_want_preallocate(
610 while (count_fsb > 0) { 610 while (count_fsb > 0) {
611 imaps = nimaps; 611 imaps = nimaps;
612 firstblock = NULLFSBLOCK; 612 firstblock = NULLFSBLOCK;
613 error = XFS_BMAPI(mp, NULL, io, start_fsb, count_fsb, 613 error = XFS_BMAPI(mp, NULL, io, start_fsb, count_fsb, 0,
614 0, &firstblock, 0, imap, &imaps, NULL); 614 &firstblock, 0, imap, &imaps, NULL, NULL);
615 if (error) 615 if (error)
616 return error; 616 return error;
617 for (n = 0; n < imaps; n++) { 617 for (n = 0; n < imaps; n++) {
@@ -695,11 +695,11 @@ retry:
695 695
696 nimaps = XFS_WRITE_IMAPS; 696 nimaps = XFS_WRITE_IMAPS;
697 firstblock = NULLFSBLOCK; 697 firstblock = NULLFSBLOCK;
698 error = xfs_bmapi(NULL, ip, offset_fsb, 698 error = XFS_BMAPI(mp, NULL, io, offset_fsb,
699 (xfs_filblks_t)(last_fsb - offset_fsb), 699 (xfs_filblks_t)(last_fsb - offset_fsb),
700 XFS_BMAPI_DELAY | XFS_BMAPI_WRITE | 700 XFS_BMAPI_DELAY | XFS_BMAPI_WRITE |
701 XFS_BMAPI_ENTIRE, &firstblock, 1, imap, 701 XFS_BMAPI_ENTIRE, &firstblock, 1, imap,
702 &nimaps, NULL); 702 &nimaps, NULL, NULL);
703 if (error && (error != ENOSPC)) 703 if (error && (error != ENOSPC))
704 return XFS_ERROR(error); 704 return XFS_ERROR(error);
705 705
@@ -832,9 +832,9 @@ xfs_iomap_write_allocate(
832 } 832 }
833 833
834 /* Go get the actual blocks */ 834 /* Go get the actual blocks */
835 error = xfs_bmapi(tp, ip, map_start_fsb, count_fsb, 835 error = XFS_BMAPI(mp, tp, io, map_start_fsb, count_fsb,
836 XFS_BMAPI_WRITE, &first_block, 1, 836 XFS_BMAPI_WRITE, &first_block, 1,
837 imap, &nimaps, &free_list); 837 imap, &nimaps, &free_list, NULL);
838 if (error) 838 if (error)
839 goto trans_cancel; 839 goto trans_cancel;
840 840
@@ -955,9 +955,9 @@ xfs_iomap_write_unwritten(
955 */ 955 */
956 XFS_BMAP_INIT(&free_list, &firstfsb); 956 XFS_BMAP_INIT(&free_list, &firstfsb);
957 nimaps = 1; 957 nimaps = 1;
958 error = xfs_bmapi(tp, ip, offset_fsb, count_fsb, 958 error = XFS_BMAPI(mp, tp, io, offset_fsb, count_fsb,
959 XFS_BMAPI_WRITE|XFS_BMAPI_CONVERT, &firstfsb, 959 XFS_BMAPI_WRITE|XFS_BMAPI_CONVERT, &firstfsb,
960 1, &imap, &nimaps, &free_list); 960 1, &imap, &nimaps, &free_list, NULL);
961 if (error) 961 if (error)
962 goto error_on_bmapi_transaction; 962 goto error_on_bmapi_transaction;
963 963