inode.c (5c34202b8bf942da411b6599668a76b07449bbfd) inode.c (85d71244f02583886dc20a60df2d4657d42116b4)
1/*
2 * inode.c
3 *
4 * PURPOSE
5 * Inode handling routines for the OSTA-UDF(tm) filesystem.
6 *
7 * COPYRIGHT
8 * This file is distributed under the terms of the GNU General Public

--- 446 unchanged lines hidden (view full) ---

455static struct buffer_head * inode_getblk(struct inode * inode, sector_t block,
456 int *err, long *phys, int *new)
457{
458 static sector_t last_block;
459 struct buffer_head *result = NULL;
460 kernel_long_ad laarr[EXTENT_MERGE_SIZE];
461 struct extent_position prev_epos, cur_epos, next_epos;
462 int count = 0, startnum = 0, endnum = 0;
1/*
2 * inode.c
3 *
4 * PURPOSE
5 * Inode handling routines for the OSTA-UDF(tm) filesystem.
6 *
7 * COPYRIGHT
8 * This file is distributed under the terms of the GNU General Public

--- 446 unchanged lines hidden (view full) ---

455static struct buffer_head * inode_getblk(struct inode * inode, sector_t block,
456 int *err, long *phys, int *new)
457{
458 static sector_t last_block;
459 struct buffer_head *result = NULL;
460 kernel_long_ad laarr[EXTENT_MERGE_SIZE];
461 struct extent_position prev_epos, cur_epos, next_epos;
462 int count = 0, startnum = 0, endnum = 0;
463 uint32_t elen = 0;
464 kernel_lb_addr eloc;
463 uint32_t elen = 0, tmpelen;
464 kernel_lb_addr eloc, tmpeloc;
465 int c = 1;
466 loff_t lbcount = 0, b_off = 0;
467 uint32_t newblocknum, newblock;
468 sector_t offset = 0;
469 int8_t etype;
470 int goal = 0, pgoal = UDF_I_LOCATION(inode).logicalBlockNum;
471 int lastblock = 0;
472

--- 42 unchanged lines hidden (view full) ---

515 ((elen + inode->i_sb->s_blocksize - 1) >>
516 inode->i_sb->s_blocksize_bits);
517
518 count ++;
519 } while (lbcount + elen <= b_off);
520
521 b_off -= lbcount;
522 offset = b_off >> inode->i_sb->s_blocksize_bits;
465 int c = 1;
466 loff_t lbcount = 0, b_off = 0;
467 uint32_t newblocknum, newblock;
468 sector_t offset = 0;
469 int8_t etype;
470 int goal = 0, pgoal = UDF_I_LOCATION(inode).logicalBlockNum;
471 int lastblock = 0;
472

--- 42 unchanged lines hidden (view full) ---

515 ((elen + inode->i_sb->s_blocksize - 1) >>
516 inode->i_sb->s_blocksize_bits);
517
518 count ++;
519 } while (lbcount + elen <= b_off);
520
521 b_off -= lbcount;
522 offset = b_off >> inode->i_sb->s_blocksize_bits;
523 /* Move into indirect extent if we are at a pointer to it */
524 udf_next_aext(inode, &prev_epos, &eloc, &elen, 0);
523 /*
524 * Move prev_epos and cur_epos into indirect extent if we are at
525 * the pointer to it
526 */
527 udf_next_aext(inode, &prev_epos, &tmpeloc, &tmpelen, 0);
528 udf_next_aext(inode, &cur_epos, &tmpeloc, &tmpelen, 0);
525
526 /* if the extent is allocated and recorded, return the block
527 if the extent is not a multiple of the blocksize, round up */
528
529 if (etype == (EXT_RECORDED_ALLOCATED >> 30))
530 {
531 if (elen & (inode->i_sb->s_blocksize - 1))
532 {

--- 1591 unchanged lines hidden ---
529
530 /* if the extent is allocated and recorded, return the block
531 if the extent is not a multiple of the blocksize, round up */
532
533 if (etype == (EXT_RECORDED_ALLOCATED >> 30))
534 {
535 if (elen & (inode->i_sb->s_blocksize - 1))
536 {

--- 1591 unchanged lines hidden ---