Lines Matching +full:1 +full:- +full:512
1 // SPDX-License-Identifier: GPL-2.0
5 * Mikulas Patocka ([email protected]), 1998-1999
18 for (i = 0; unlikely(i < sbi->n_hotfixes); i++) { in hpfs_search_hotfix_map()
19 if (sbi->hotfix_from[i] == sec) { in hpfs_search_hotfix_map()
20 return sbi->hotfix_to[i]; in hpfs_search_hotfix_map()
30 for (i = 0; unlikely(i < sbi->n_hotfixes); i++) { in hpfs_search_hotfix_map_for_range()
31 if (sbi->hotfix_from[i] >= sec && sbi->hotfix_from[i] < sec + n) { in hpfs_search_hotfix_map_for_range()
32 n = sbi->hotfix_from[i] - sec; in hpfs_search_hotfix_map_for_range()
43 if (n <= 0 || unlikely(secno >= hpfs_sb(s)->sb_fs_size)) in hpfs_prefetch_sectors()
60 if (unlikely(secno >= hpfs_sb(s)->sb_fs_size)) in hpfs_prefetch_sectors()
64 n--; in hpfs_prefetch_sectors()
84 return bh->b_data; in hpfs_map_sector()
105 return bh->b_data; in hpfs_get_sector()
130 if (!hpfs_map_sector(s, secno + 0, &qbh->bh[0], 0)) goto bail0; in hpfs_map_4sectors()
131 if (!hpfs_map_sector(s, secno + 1, &qbh->bh[1], 0)) goto bail1; in hpfs_map_4sectors()
132 if (!hpfs_map_sector(s, secno + 2, &qbh->bh[2], 0)) goto bail2; in hpfs_map_4sectors()
133 if (!hpfs_map_sector(s, secno + 3, &qbh->bh[3], 0)) goto bail3; in hpfs_map_4sectors()
135 if (likely(qbh->bh[1]->b_data == qbh->bh[0]->b_data + 1 * 512) && in hpfs_map_4sectors()
136 likely(qbh->bh[2]->b_data == qbh->bh[0]->b_data + 2 * 512) && in hpfs_map_4sectors()
137 likely(qbh->bh[3]->b_data == qbh->bh[0]->b_data + 3 * 512)) { in hpfs_map_4sectors()
138 return qbh->data = qbh->bh[0]->b_data; in hpfs_map_4sectors()
141 qbh->data = data = kmalloc(2048, GFP_NOFS); in hpfs_map_4sectors()
147 memcpy(data + 0 * 512, qbh->bh[0]->b_data, 512); in hpfs_map_4sectors()
148 memcpy(data + 1 * 512, qbh->bh[1]->b_data, 512); in hpfs_map_4sectors()
149 memcpy(data + 2 * 512, qbh->bh[2]->b_data, 512); in hpfs_map_4sectors()
150 memcpy(data + 3 * 512, qbh->bh[3]->b_data, 512); in hpfs_map_4sectors()
155 brelse(qbh->bh[3]); in hpfs_map_4sectors()
157 brelse(qbh->bh[2]); in hpfs_map_4sectors()
159 brelse(qbh->bh[1]); in hpfs_map_4sectors()
161 brelse(qbh->bh[0]); in hpfs_map_4sectors()
180 if (!hpfs_get_sector(s, secno + 0, &qbh->bh[0])) goto bail0; in hpfs_get_4sectors()
181 if (!hpfs_get_sector(s, secno + 1, &qbh->bh[1])) goto bail1; in hpfs_get_4sectors()
182 if (!hpfs_get_sector(s, secno + 2, &qbh->bh[2])) goto bail2; in hpfs_get_4sectors()
183 if (!hpfs_get_sector(s, secno + 3, &qbh->bh[3])) goto bail3; in hpfs_get_4sectors()
185 if (likely(qbh->bh[1]->b_data == qbh->bh[0]->b_data + 1 * 512) && in hpfs_get_4sectors()
186 likely(qbh->bh[2]->b_data == qbh->bh[0]->b_data + 2 * 512) && in hpfs_get_4sectors()
187 likely(qbh->bh[3]->b_data == qbh->bh[0]->b_data + 3 * 512)) { in hpfs_get_4sectors()
188 return qbh->data = qbh->bh[0]->b_data; in hpfs_get_4sectors()
191 if (!(qbh->data = kmalloc(2048, GFP_NOFS))) { in hpfs_get_4sectors()
195 return qbh->data; in hpfs_get_4sectors()
198 brelse(qbh->bh[3]); in hpfs_get_4sectors()
200 brelse(qbh->bh[2]); in hpfs_get_4sectors()
202 brelse(qbh->bh[1]); in hpfs_get_4sectors()
204 brelse(qbh->bh[0]); in hpfs_get_4sectors()
212 if (unlikely(qbh->data != qbh->bh[0]->b_data)) in hpfs_brelse4()
213 kfree(qbh->data); in hpfs_brelse4()
214 brelse(qbh->bh[0]); in hpfs_brelse4()
215 brelse(qbh->bh[1]); in hpfs_brelse4()
216 brelse(qbh->bh[2]); in hpfs_brelse4()
217 brelse(qbh->bh[3]); in hpfs_brelse4()
222 if (unlikely(qbh->data != qbh->bh[0]->b_data)) { in hpfs_mark_4buffers_dirty()
223 memcpy(qbh->bh[0]->b_data, qbh->data + 0 * 512, 512); in hpfs_mark_4buffers_dirty()
224 memcpy(qbh->bh[1]->b_data, qbh->data + 1 * 512, 512); in hpfs_mark_4buffers_dirty()
225 memcpy(qbh->bh[2]->b_data, qbh->data + 2 * 512, 512); in hpfs_mark_4buffers_dirty()
226 memcpy(qbh->bh[3]->b_data, qbh->data + 3 * 512, 512); in hpfs_mark_4buffers_dirty()
228 mark_buffer_dirty(qbh->bh[0]); in hpfs_mark_4buffers_dirty()
229 mark_buffer_dirty(qbh->bh[1]); in hpfs_mark_4buffers_dirty()
230 mark_buffer_dirty(qbh->bh[2]); in hpfs_mark_4buffers_dirty()
231 mark_buffer_dirty(qbh->bh[3]); in hpfs_mark_4buffers_dirty()