@@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
22
22
23
23
static int befs_find_brun_direct (struct super_block * sb ,
24
24
const befs_data_stream * data ,
25
- befs_blocknr_t blockno , befs_block_run * run );
25
+ befs_blocknr_t blockno , befs_block_run * run );
26
26
27
27
static int befs_find_brun_indirect (struct super_block * sb ,
28
28
const befs_data_stream * data ,
29
29
befs_blocknr_t blockno ,
30
- befs_block_run * run );
30
+ befs_block_run * run );
31
31
32
32
static int befs_find_brun_dblindirect (struct super_block * sb ,
33
33
const befs_data_stream * data ,
34
34
befs_blocknr_t blockno ,
35
- befs_block_run * run );
35
+ befs_block_run * run );
36
36
37
37
/**
38
38
* befs_read_datastream - get buffer_head containing data, starting from pos.
@@ -46,7 +46,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb,
46
46
*/
47
47
struct buffer_head *
48
48
befs_read_datastream (struct super_block * sb , const befs_data_stream * ds ,
49
- befs_off_t pos , uint * off )
49
+ befs_off_t pos , uint * off )
50
50
{
51
51
struct buffer_head * bh ;
52
52
befs_block_run run ;
@@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
94
94
*/
95
95
int
96
96
befs_fblock2brun (struct super_block * sb , const befs_data_stream * data ,
97
- befs_blocknr_t fblock , befs_block_run * run )
97
+ befs_blocknr_t fblock , befs_block_run * run )
98
98
{
99
99
int err ;
100
100
befs_off_t pos = fblock << BEFS_SB (sb )-> block_shift ;
@@ -134,6 +134,7 @@ befs_read_lsymlink(struct super_block *sb, const befs_data_stream *ds,
134
134
befs_off_t bytes_read = 0 ; /* bytes readed */
135
135
u16 plen ;
136
136
struct buffer_head * bh ;
137
+
137
138
befs_debug (sb , "---> %s length: %llu" , __func__ , len );
138
139
139
140
while (bytes_read < len ) {
@@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
189
190
metablocks += ds -> indirect .len ;
190
191
191
192
/*
192
- Double indir block, plus all the indirect blocks it maps.
193
- In the double-indirect range, all block runs of data are
194
- BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
195
- how many data block runs are in the double-indirect region,
196
- and from that we know how many indirect blocks it takes to
197
- map them. We assume that the indirect blocks are also
198
- BEFS_DBLINDIR_BRUN_LEN blocks long.
193
+ * Double indir block, plus all the indirect blocks it maps.
194
+ * In the double-indirect range, all block runs of data are
195
+ * BEFS_DBLINDIR_BRUN_LEN blocks long. Therefore, we know
196
+ * how many data block runs are in the double-indirect region,
197
+ * and from that we know how many indirect blocks it takes to
198
+ * map them. We assume that the indirect blocks are also
199
+ * BEFS_DBLINDIR_BRUN_LEN blocks long.
199
200
*/
200
201
if (ds -> size > ds -> max_indirect_range && ds -> max_indirect_range != 0 ) {
201
202
uint dbl_bytes ;
@@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
249
250
*/
250
251
static int
251
252
befs_find_brun_direct (struct super_block * sb , const befs_data_stream * data ,
252
- befs_blocknr_t blockno , befs_block_run * run )
253
+ befs_blocknr_t blockno , befs_block_run * run )
253
254
{
254
255
int i ;
255
256
const befs_block_run * array = data -> direct ;
@@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
261
262
sum += array [i ].len , i ++ ) {
262
263
if (blockno >= sum && blockno < sum + (array [i ].len )) {
263
264
int offset = blockno - sum ;
265
+
264
266
run -> allocation_group = array [i ].allocation_group ;
265
267
run -> start = array [i ].start + offset ;
266
268
run -> len = array [i ].len - offset ;
@@ -304,7 +306,7 @@ static int
304
306
befs_find_brun_indirect (struct super_block * sb ,
305
307
const befs_data_stream * data ,
306
308
befs_blocknr_t blockno ,
307
- befs_block_run * run )
309
+ befs_block_run * run )
308
310
{
309
311
int i , j ;
310
312
befs_blocknr_t sum = 0 ;
@@ -413,7 +415,7 @@ static int
413
415
befs_find_brun_dblindirect (struct super_block * sb ,
414
416
const befs_data_stream * data ,
415
417
befs_blocknr_t blockno ,
416
- befs_block_run * run )
418
+ befs_block_run * run )
417
419
{
418
420
int dblindir_indx ;
419
421
int indir_indx ;
0 commit comments