diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-09-18 16:40:52 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 22:15:04 -0400 |
commit | c0dc7828af6952643219292be29e482ef74cb261 (patch) | |
tree | 02f12935ec56f61a9ed396d1b902b21aaf4ffb3e /fs/xfs/xfs_vnodeops.c | |
parent | b447fe5a05cbd01c4bf7fe2fa41cb9e99ce7e58e (diff) |
xfs: rename xfs_bmapi to xfs_bmapi_write
Now that all the read-only users of xfs_bmapi have been converted to
use xfs_bmapi_read(), we can remove all the read-only handling cases
from xfs_bmapi().
Once this is done, rename xfs_bmapi to xfs_bmapi_write to reflect
the fact it is for allocation only. This enables us to kill the
XFS_BMAPI_WRITE flag as well.
Also clean up xfs_bmapi_write to the style used in the newly added
xfs_bmapi_read/delay functions.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 63874a87b378..f47ecee8d437 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -1633,10 +1633,9 @@ xfs_symlink( | |||
1633 | first_fsb = 0; | 1633 | first_fsb = 0; |
1634 | nmaps = SYMLINK_MAPS; | 1634 | nmaps = SYMLINK_MAPS; |
1635 | 1635 | ||
1636 | error = xfs_bmapi(tp, ip, first_fsb, fs_blocks, | 1636 | error = xfs_bmapi_write(tp, ip, first_fsb, fs_blocks, |
1637 | XFS_BMAPI_WRITE | XFS_BMAPI_METADATA, | 1637 | XFS_BMAPI_METADATA, &first_block, resblks, |
1638 | &first_block, resblks, mval, &nmaps, | 1638 | mval, &nmaps, &free_list); |
1639 | &free_list); | ||
1640 | if (error) | 1639 | if (error) |
1641 | goto error2; | 1640 | goto error2; |
1642 | 1641 | ||
@@ -1782,7 +1781,6 @@ xfs_alloc_file_space( | |||
1782 | xfs_fileoff_t startoffset_fsb; | 1781 | xfs_fileoff_t startoffset_fsb; |
1783 | xfs_fsblock_t firstfsb; | 1782 | xfs_fsblock_t firstfsb; |
1784 | int nimaps; | 1783 | int nimaps; |
1785 | int bmapi_flag; | ||
1786 | int quota_flag; | 1784 | int quota_flag; |
1787 | int rt; | 1785 | int rt; |
1788 | xfs_trans_t *tp; | 1786 | xfs_trans_t *tp; |
@@ -1810,7 +1808,6 @@ xfs_alloc_file_space( | |||
1810 | count = len; | 1808 | count = len; |
1811 | imapp = &imaps[0]; | 1809 | imapp = &imaps[0]; |
1812 | nimaps = 1; | 1810 | nimaps = 1; |
1813 | bmapi_flag = XFS_BMAPI_WRITE | alloc_type; | ||
1814 | startoffset_fsb = XFS_B_TO_FSBT(mp, offset); | 1811 | startoffset_fsb = XFS_B_TO_FSBT(mp, offset); |
1815 | allocatesize_fsb = XFS_B_TO_FSB(mp, count); | 1812 | allocatesize_fsb = XFS_B_TO_FSB(mp, count); |
1816 | 1813 | ||
@@ -1883,14 +1880,10 @@ xfs_alloc_file_space( | |||
1883 | 1880 | ||
1884 | xfs_trans_ijoin(tp, ip); | 1881 | xfs_trans_ijoin(tp, ip); |
1885 | 1882 | ||
1886 | /* | ||
1887 | * Issue the xfs_bmapi() call to allocate the blocks | ||
1888 | */ | ||
1889 | xfs_bmap_init(&free_list, &firstfsb); | 1883 | xfs_bmap_init(&free_list, &firstfsb); |
1890 | error = xfs_bmapi(tp, ip, startoffset_fsb, | 1884 | error = xfs_bmapi_write(tp, ip, startoffset_fsb, |
1891 | allocatesize_fsb, bmapi_flag, | 1885 | allocatesize_fsb, alloc_type, &firstfsb, |
1892 | &firstfsb, 0, imapp, &nimaps, | 1886 | 0, imapp, &nimaps, &free_list); |
1893 | &free_list); | ||
1894 | if (error) { | 1887 | if (error) { |
1895 | goto error0; | 1888 | goto error0; |
1896 | } | 1889 | } |