Lines Matching refs:epos

76 		brelse(iinfo->cached_extent.epos.bh);  in __udf_clear_extent_cache()
103 memcpy(pos, &iinfo->cached_extent.epos, in udf_read_extent_cache()
124 memcpy(&iinfo->cached_extent.epos, pos, sizeof(*pos)); in udf_update_extent_cache()
128 iinfo->cached_extent.epos.offset -= sizeof(struct short_ad); in udf_update_extent_cache()
131 iinfo->cached_extent.epos.offset -= sizeof(struct long_ad); in udf_update_extent_cache()
335 struct extent_position epos; in udf_expand_dir_adinicb() local
407 epos.bh = NULL; in udf_expand_dir_adinicb()
408 epos.block = iinfo->i_location; in udf_expand_dir_adinicb()
409 epos.offset = udf_file_entry_alloc_offset(inode); in udf_expand_dir_adinicb()
410 udf_add_aext(inode, &epos, &eloc, inode->i_size, 0); in udf_expand_dir_adinicb()
413 brelse(epos.bh); in udf_expand_dir_adinicb()
614 struct extent_position epos; in udf_extend_file() local
640 etype = inode_bmap(inode, first_block, &epos, &eloc, &elen, &offset); in udf_extend_file()
646 if ((!epos.bh && epos.offset == udf_file_entry_alloc_offset(inode)) || in udf_extend_file()
647 (epos.bh && epos.offset == sizeof(struct allocExtDesc))) { in udf_extend_file()
654 epos.offset -= adsize; in udf_extend_file()
655 etype = udf_next_aext(inode, &epos, &extent.extLocation, in udf_extend_file()
668 udf_do_extend_final_block(inode, &epos, &extent, new_elen); in udf_extend_file()
670 err = udf_do_extend_file(inode, &epos, &extent, new_elen); in udf_extend_file()
678 brelse(epos.bh); in udf_extend_file()
1171 struct extent_position *epos) in udf_update_extents() argument
1179 udf_delete_aext(inode, *epos); in udf_update_extents()
1182 udf_insert_aext(inode, *epos, laarr[i].extLocation, in udf_update_extents()
1184 udf_next_aext(inode, epos, &laarr[i].extLocation, in udf_update_extents()
1191 udf_next_aext(inode, epos, &tmploc, &tmplen, 0); in udf_update_extents()
1192 udf_write_aext(inode, epos, &laarr[i].extLocation, in udf_update_extents()
1913 struct extent_position *epos) in udf_setup_indirect_aext() argument
1930 neloc.partitionReferenceNum = epos->block.partitionReferenceNum; in udf_setup_indirect_aext()
1944 cpu_to_le32(epos->block.logicalBlockNum); in udf_setup_indirect_aext()
1962 if (epos->offset + adsize > sb->s_blocksize) { in udf_setup_indirect_aext()
1967 epos->offset -= adsize; in udf_setup_indirect_aext()
1968 cp_type = udf_current_aext(inode, epos, &cp_loc, &cp_len, 0); in udf_setup_indirect_aext()
1972 udf_write_aext(inode, epos, &nepos.block, in udf_setup_indirect_aext()
1975 __udf_add_aext(inode, epos, &nepos.block, in udf_setup_indirect_aext()
1979 brelse(epos->bh); in udf_setup_indirect_aext()
1980 *epos = nepos; in udf_setup_indirect_aext()
1990 int __udf_add_aext(struct inode *inode, struct extent_position *epos, in __udf_add_aext() argument
2004 if (!epos->bh) { in __udf_add_aext()
2006 epos->offset - udf_file_entry_alloc_offset(inode)); in __udf_add_aext()
2008 aed = (struct allocExtDesc *)epos->bh->b_data; in __udf_add_aext()
2010 epos->offset - sizeof(struct allocExtDesc)); in __udf_add_aext()
2011 WARN_ON(epos->offset + adsize > inode->i_sb->s_blocksize); in __udf_add_aext()
2014 udf_write_aext(inode, epos, eloc, elen, inc); in __udf_add_aext()
2016 if (!epos->bh) { in __udf_add_aext()
2020 aed = (struct allocExtDesc *)epos->bh->b_data; in __udf_add_aext()
2024 udf_update_tag(epos->bh->b_data, in __udf_add_aext()
2025 epos->offset + (inc ? 0 : adsize)); in __udf_add_aext()
2027 udf_update_tag(epos->bh->b_data, in __udf_add_aext()
2029 mark_buffer_dirty_inode(epos->bh, inode); in __udf_add_aext()
2039 int udf_add_aext(struct inode *inode, struct extent_position *epos, in udf_add_aext() argument
2052 if (epos->offset + (2 * adsize) > sb->s_blocksize) { in udf_add_aext()
2057 epos->block.partitionReferenceNum, in udf_add_aext()
2058 epos->block.logicalBlockNum, &err); in udf_add_aext()
2062 err = udf_setup_indirect_aext(inode, new_block, epos); in udf_add_aext()
2067 return __udf_add_aext(inode, epos, eloc, elen, inc); in udf_add_aext()
2070 void udf_write_aext(struct inode *inode, struct extent_position *epos, in udf_write_aext() argument
2079 if (!epos->bh) in udf_write_aext()
2080 ptr = iinfo->i_data + epos->offset - in udf_write_aext()
2084 ptr = epos->bh->b_data + epos->offset; in udf_write_aext()
2104 if (epos->bh) { in udf_write_aext()
2108 (struct allocExtDesc *)epos->bh->b_data; in udf_write_aext()
2109 udf_update_tag(epos->bh->b_data, in udf_write_aext()
2113 mark_buffer_dirty_inode(epos->bh, inode); in udf_write_aext()
2119 epos->offset += adsize; in udf_write_aext()
2128 int8_t udf_next_aext(struct inode *inode, struct extent_position *epos, in udf_next_aext() argument
2134 while ((etype = udf_current_aext(inode, epos, eloc, elen, inc)) == in udf_next_aext()
2145 epos->block = *eloc; in udf_next_aext()
2146 epos->offset = sizeof(struct allocExtDesc); in udf_next_aext()
2147 brelse(epos->bh); in udf_next_aext()
2148 block = udf_get_lb_pblock(inode->i_sb, &epos->block, 0); in udf_next_aext()
2149 epos->bh = udf_tread(inode->i_sb, block); in udf_next_aext()
2150 if (!epos->bh) { in udf_next_aext()
2159 int8_t udf_current_aext(struct inode *inode, struct extent_position *epos, in udf_current_aext() argument
2169 if (!epos->bh) { in udf_current_aext()
2170 if (!epos->offset) in udf_current_aext()
2171 epos->offset = udf_file_entry_alloc_offset(inode); in udf_current_aext()
2172 ptr = iinfo->i_data + epos->offset - in udf_current_aext()
2178 if (!epos->offset) in udf_current_aext()
2179 epos->offset = sizeof(struct allocExtDesc); in udf_current_aext()
2180 ptr = epos->bh->b_data + epos->offset; in udf_current_aext()
2182 le32_to_cpu(((struct allocExtDesc *)epos->bh->b_data)-> in udf_current_aext()
2188 sad = udf_get_fileshortad(ptr, alen, &epos->offset, inc); in udf_current_aext()
2198 lad = udf_get_filelongad(ptr, alen, &epos->offset, inc); in udf_current_aext()
2213 static int8_t udf_insert_aext(struct inode *inode, struct extent_position epos, in udf_insert_aext() argument
2220 if (epos.bh) in udf_insert_aext()
2221 get_bh(epos.bh); in udf_insert_aext()
2223 while ((etype = udf_next_aext(inode, &epos, &oeloc, &oelen, 0)) != -1) { in udf_insert_aext()
2224 udf_write_aext(inode, &epos, &neloc, nelen, 1); in udf_insert_aext()
2228 udf_add_aext(inode, &epos, &neloc, nelen, 1); in udf_insert_aext()
2229 brelse(epos.bh); in udf_insert_aext()
2234 int8_t udf_delete_aext(struct inode *inode, struct extent_position epos) in udf_delete_aext() argument
2244 if (epos.bh) { in udf_delete_aext()
2245 get_bh(epos.bh); in udf_delete_aext()
2246 get_bh(epos.bh); in udf_delete_aext()
2257 oepos = epos; in udf_delete_aext()
2258 if (udf_next_aext(inode, &epos, &eloc, &elen, 1) == -1) in udf_delete_aext()
2261 while ((etype = udf_next_aext(inode, &epos, &eloc, &elen, 1)) != -1) { in udf_delete_aext()
2263 if (oepos.bh != epos.bh) { in udf_delete_aext()
2264 oepos.block = epos.block; in udf_delete_aext()
2266 get_bh(epos.bh); in udf_delete_aext()
2267 oepos.bh = epos.bh; in udf_delete_aext()
2268 oepos.offset = epos.offset - adsize; in udf_delete_aext()
2274 if (epos.bh != oepos.bh) { in udf_delete_aext()
2275 udf_free_blocks(inode->i_sb, inode, &epos.block, 0, 1); in udf_delete_aext()
2304 epos.offset - adsize); in udf_delete_aext()
2312 brelse(epos.bh); in udf_delete_aext()
2355 struct extent_position epos = {}; in udf_block_map() local
2360 if (inode_bmap(inode, block, &epos, &eloc, &elen, &offset) == in udf_block_map()
2367 brelse(epos.bh); in udf_block_map()