@@ -22,17 +22,17 @@ const befs_inode_addr BAD_IADDR = { 0, 0, 0 };
2222
2323static int befs_find_brun_direct (struct super_block * sb ,
2424const befs_data_stream * data ,
25- befs_blocknr_t blockno ,befs_block_run * run );
25+ befs_blocknr_t blockno ,befs_block_run * run );
2626
2727static int befs_find_brun_indirect (struct super_block * sb ,
2828const befs_data_stream * data ,
2929befs_blocknr_t blockno ,
30- befs_block_run * run );
30+ befs_block_run * run );
3131
3232static int befs_find_brun_dblindirect (struct super_block * sb ,
3333const befs_data_stream * data ,
3434befs_blocknr_t blockno ,
35- befs_block_run * run );
35+ befs_block_run * run );
3636
3737/**
3838 * 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,
4646 */
4747struct buffer_head *
4848befs_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 )
5050{
5151struct buffer_head * bh ;
5252befs_block_run run ;
@@ -94,7 +94,7 @@ befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
9494 */
9595int
9696befs_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 )
9898{
9999int err ;
100100befs_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,
134134befs_off_t bytes_read = 0 ;/* bytes readed */
135135u16 plen ;
136136struct buffer_head * bh ;
137+
137138befs_debug (sb ,"---> %s length: %llu" ,__func__ ,len );
138139
139140while (bytes_read < len ) {
@@ -189,13 +190,13 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
189190metablocks += ds -> indirect .len ;
190191
191192/*
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.
199200 */
200201if (ds -> size > ds -> max_indirect_range && ds -> max_indirect_range != 0 ) {
201202uint dbl_bytes ;
@@ -249,7 +250,7 @@ befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
249250 */
250251static int
251252befs_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 )
253254{
254255int i ;
255256const befs_block_run * array = data -> direct ;
@@ -261,6 +262,7 @@ befs_find_brun_direct(struct super_block *sb, const befs_data_stream *data,
261262sum += array [i ].len ,i ++ ) {
262263if (blockno >=sum && blockno < sum + (array [i ].len )) {
263264int offset = blockno - sum ;
265+
264266run -> allocation_group = array [i ].allocation_group ;
265267run -> start = array [i ].start + offset ;
266268run -> len = array [i ].len - offset ;
@@ -304,7 +306,7 @@ static int
304306befs_find_brun_indirect (struct super_block * sb ,
305307const befs_data_stream * data ,
306308befs_blocknr_t blockno ,
307- befs_block_run * run )
309+ befs_block_run * run )
308310{
309311int i ,j ;
310312befs_blocknr_t sum = 0 ;
@@ -413,7 +415,7 @@ static int
413415befs_find_brun_dblindirect (struct super_block * sb ,
414416const befs_data_stream * data ,
415417befs_blocknr_t blockno ,
416- befs_block_run * run )
418+ befs_block_run * run )
417419{
418420int dblindir_indx ;
419421int indir_indx ;