diff options
author | Alex Elder <aelder@sgi.com> | 2010-04-20 03:10:21 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-19 10:58:16 -0400 |
commit | 48389ef17583f2214bbd2c119b3015677419c16b (patch) | |
tree | ff6b8e0cf45cb4e32e77a6ae0a9fa18c845a5ca3 /fs/xfs/xfs_log_recover.c | |
parent | 69ce58f08a3c455ff74cfcde90e9ab267d67f636 (diff) |
xfs: kill off l_sectbb_mask
There remains only one user of the l_sectbb_mask field in the log
structure. Just kill it off and compute the mask where needed from
the power-of-2 sector size.
(Only update from last post is to accomodate the changes in the
previous patch in the series.)
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index f1220ec1896f..0de08e366315 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -121,6 +121,10 @@ xlog_put_bp( | |||
121 | xfs_buf_free(bp); | 121 | xfs_buf_free(bp); |
122 | } | 122 | } |
123 | 123 | ||
124 | /* | ||
125 | * Return the address of the start of the given block number's data | ||
126 | * in a log buffer. The buffer covers a log sector-aligned region. | ||
127 | */ | ||
124 | STATIC xfs_caddr_t | 128 | STATIC xfs_caddr_t |
125 | xlog_align( | 129 | xlog_align( |
126 | xlog_t *log, | 130 | xlog_t *log, |
@@ -128,14 +132,14 @@ xlog_align( | |||
128 | int nbblks, | 132 | int nbblks, |
129 | xfs_buf_t *bp) | 133 | xfs_buf_t *bp) |
130 | { | 134 | { |
135 | xfs_daddr_t offset; | ||
131 | xfs_caddr_t ptr; | 136 | xfs_caddr_t ptr; |
132 | 137 | ||
133 | if (log->l_sectBBsize == 1) | 138 | offset = blk_no & ((xfs_daddr_t) log->l_sectBBsize - 1); |
134 | return XFS_BUF_PTR(bp); | 139 | ptr = XFS_BUF_PTR(bp) + BBTOB(offset); |
140 | |||
141 | ASSERT(ptr + BBTOB(nbblks) <= XFS_BUF_PTR(bp) + XFS_BUF_SIZE(bp)); | ||
135 | 142 | ||
136 | ptr = XFS_BUF_PTR(bp) + BBTOB((int)blk_no & log->l_sectbb_mask); | ||
137 | ASSERT(XFS_BUF_SIZE(bp) >= | ||
138 | BBTOB(nbblks + (blk_no & log->l_sectbb_mask))); | ||
139 | return ptr; | 143 | return ptr; |
140 | } | 144 | } |
141 | 145 | ||