diff options
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 98dc670d3ee0..6f9e63c9fc26 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -17,25 +17,24 @@ | |||
17 | */ | 17 | */ |
18 | #include "xfs.h" | 18 | #include "xfs.h" |
19 | #include "xfs_fs.h" | 19 | #include "xfs_fs.h" |
20 | #include "xfs_types.h" | 20 | #include "xfs_format.h" |
21 | #include "xfs_bit.h" | 21 | #include "xfs_bit.h" |
22 | #include "xfs_log.h" | 22 | #include "xfs_log.h" |
23 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
24 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
25 | #include "xfs_ag.h" | 25 | #include "xfs_ag.h" |
26 | #include "xfs_dir2.h" | ||
27 | #include "xfs_mount.h" | 26 | #include "xfs_mount.h" |
28 | #include "xfs_bmap_btree.h" | 27 | #include "xfs_bmap_btree.h" |
29 | #include "xfs_dinode.h" | 28 | #include "xfs_dinode.h" |
30 | #include "xfs_inode.h" | 29 | #include "xfs_inode.h" |
31 | #include "xfs_alloc.h" | 30 | #include "xfs_alloc.h" |
32 | #include "xfs_bmap.h" | 31 | #include "xfs_bmap.h" |
32 | #include "xfs_bmap_util.h" | ||
33 | #include "xfs_rtalloc.h" | 33 | #include "xfs_rtalloc.h" |
34 | #include "xfs_fsops.h" | 34 | #include "xfs_fsops.h" |
35 | #include "xfs_error.h" | 35 | #include "xfs_error.h" |
36 | #include "xfs_inode_item.h" | 36 | #include "xfs_inode_item.h" |
37 | #include "xfs_trans_space.h" | 37 | #include "xfs_trans_space.h" |
38 | #include "xfs_utils.h" | ||
39 | #include "xfs_trace.h" | 38 | #include "xfs_trace.h" |
40 | #include "xfs_buf.h" | 39 | #include "xfs_buf.h" |
41 | #include "xfs_icache.h" | 40 | #include "xfs_icache.h" |
@@ -101,10 +100,9 @@ xfs_growfs_rt_alloc( | |||
101 | /* | 100 | /* |
102 | * Reserve space & log for one extent added to the file. | 101 | * Reserve space & log for one extent added to the file. |
103 | */ | 102 | */ |
104 | if ((error = xfs_trans_reserve(tp, resblks, | 103 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growdata, |
105 | XFS_GROWRTALLOC_LOG_RES(mp), 0, | 104 | resblks, 0); |
106 | XFS_TRANS_PERM_LOG_RES, | 105 | if (error) |
107 | XFS_DEFAULT_PERM_LOG_COUNT))) | ||
108 | goto error_cancel; | 106 | goto error_cancel; |
109 | cancelflags = XFS_TRANS_RELEASE_LOG_RES; | 107 | cancelflags = XFS_TRANS_RELEASE_LOG_RES; |
110 | /* | 108 | /* |
@@ -147,8 +145,9 @@ xfs_growfs_rt_alloc( | |||
147 | /* | 145 | /* |
148 | * Reserve log for one block zeroing. | 146 | * Reserve log for one block zeroing. |
149 | */ | 147 | */ |
150 | if ((error = xfs_trans_reserve(tp, 0, | 148 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growrtzero, |
151 | XFS_GROWRTZERO_LOG_RES(mp), 0, 0, 0))) | 149 | 0, 0); |
150 | if (error) | ||
152 | goto error_cancel; | 151 | goto error_cancel; |
153 | /* | 152 | /* |
154 | * Lock the bitmap inode. | 153 | * Lock the bitmap inode. |
@@ -736,8 +735,8 @@ xfs_rtallocate_range( | |||
736 | { | 735 | { |
737 | xfs_rtblock_t end; /* end of the allocated extent */ | 736 | xfs_rtblock_t end; /* end of the allocated extent */ |
738 | int error; /* error value */ | 737 | int error; /* error value */ |
739 | xfs_rtblock_t postblock; /* first block allocated > end */ | 738 | xfs_rtblock_t postblock = 0; /* first block allocated > end */ |
740 | xfs_rtblock_t preblock; /* first block allocated < start */ | 739 | xfs_rtblock_t preblock = 0; /* first block allocated < start */ |
741 | 740 | ||
742 | end = start + len - 1; | 741 | end = start + len - 1; |
743 | /* | 742 | /* |
@@ -1958,8 +1957,9 @@ xfs_growfs_rt( | |||
1958 | * Start a transaction, get the log reservation. | 1957 | * Start a transaction, get the log reservation. |
1959 | */ | 1958 | */ |
1960 | tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFSRT_FREE); | 1959 | tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFSRT_FREE); |
1961 | if ((error = xfs_trans_reserve(tp, 0, | 1960 | error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growrtfree, |
1962 | XFS_GROWRTFREE_LOG_RES(nmp), 0, 0, 0))) | 1961 | 0, 0); |
1962 | if (error) | ||
1963 | goto error_cancel; | 1963 | goto error_cancel; |
1964 | /* | 1964 | /* |
1965 | * Lock out other callers by grabbing the bitmap inode lock. | 1965 | * Lock out other callers by grabbing the bitmap inode lock. |
@@ -2148,7 +2148,7 @@ xfs_rtfree_extent( | |||
2148 | ASSERT(mp->m_rbmip->i_itemp != NULL); | 2148 | ASSERT(mp->m_rbmip->i_itemp != NULL); |
2149 | ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); | 2149 | ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); |
2150 | 2150 | ||
2151 | #if defined(__KERNEL__) && defined(DEBUG) | 2151 | #ifdef DEBUG |
2152 | /* | 2152 | /* |
2153 | * Check to see that this whole range is currently allocated. | 2153 | * Check to see that this whole range is currently allocated. |
2154 | */ | 2154 | */ |