• Home
  • Raw
  • Download

Lines Matching refs:map

26 				     struct erofs_map_blocks *map,  in erofs_map_blocks_flatmode()  argument
31 u64 offset = map->m_la; in erofs_map_blocks_flatmode()
35 trace_erofs_map_blocks_flatmode_enter(inode, map, flags); in erofs_map_blocks_flatmode()
41 map->m_flags = EROFS_MAP_MAPPED; in erofs_map_blocks_flatmode()
44 map->m_pa = blknr_to_addr(vi->raw_blkaddr) + map->m_la; in erofs_map_blocks_flatmode()
45 map->m_plen = blknr_to_addr(lastblk) - offset; in erofs_map_blocks_flatmode()
50 map->m_pa = iloc(sbi, vi->nid) + vi->inode_isize + in erofs_map_blocks_flatmode()
51 vi->xattr_isize + erofs_blkoff(map->m_la); in erofs_map_blocks_flatmode()
52 map->m_plen = inode->i_size - offset; in erofs_map_blocks_flatmode()
55 if (erofs_blkoff(map->m_pa) + map->m_plen > PAGE_SIZE) { in erofs_map_blocks_flatmode()
64 map->m_flags |= EROFS_MAP_META; in erofs_map_blocks_flatmode()
68 vi->nid, inode->i_size, map->m_la); in erofs_map_blocks_flatmode()
74 map->m_llen = map->m_plen; in erofs_map_blocks_flatmode()
76 trace_erofs_map_blocks_flatmode_exit(inode, map, flags, 0); in erofs_map_blocks_flatmode()
81 struct erofs_map_blocks *map, int flags) in erofs_map_blocks() argument
92 map->m_deviceid = 0; in erofs_map_blocks()
93 if (map->m_la >= inode->i_size) { in erofs_map_blocks()
95 map->m_flags = 0; in erofs_map_blocks()
96 map->m_plen = 0; in erofs_map_blocks()
101 return erofs_map_blocks_flatmode(inode, map, flags); in erofs_map_blocks()
108 chunknr = map->m_la >> vi->chunkbits; in erofs_map_blocks()
116 map->m_la = chunknr << vi->chunkbits; in erofs_map_blocks()
117 map->m_plen = min_t(erofs_off_t, 1UL << vi->chunkbits, in erofs_map_blocks()
118 roundup(inode->i_size - map->m_la, EROFS_BLKSIZ)); in erofs_map_blocks()
125 map->m_flags = 0; in erofs_map_blocks()
127 map->m_pa = blknr_to_addr(le32_to_cpu(*blkaddr)); in erofs_map_blocks()
128 map->m_flags = EROFS_MAP_MAPPED; in erofs_map_blocks()
136 map->m_flags = 0; in erofs_map_blocks()
139 map->m_deviceid = le16_to_cpu(idx->device_id) & in erofs_map_blocks()
141 map->m_pa = blknr_to_addr(le32_to_cpu(idx->blkaddr)); in erofs_map_blocks()
142 map->m_flags = EROFS_MAP_MAPPED; in erofs_map_blocks()
149 map->m_llen = map->m_plen; in erofs_map_blocks()
153 int erofs_map_dev(struct super_block *sb, struct erofs_map_dev *map) in erofs_map_dev() argument
160 map->m_bdev = sb->s_bdev; in erofs_map_dev()
161 map->m_daxdev = EROFS_SB(sb)->dax_dev; in erofs_map_dev()
163 if (map->m_deviceid) { in erofs_map_dev()
165 dif = idr_find(&devs->tree, map->m_deviceid - 1); in erofs_map_dev()
170 map->m_bdev = dif->bdev; in erofs_map_dev()
171 map->m_daxdev = dif->dax_dev; in erofs_map_dev()
183 if (map->m_pa >= startoff && in erofs_map_dev()
184 map->m_pa < startoff + length) { in erofs_map_dev()
185 map->m_pa -= startoff; in erofs_map_dev()
186 map->m_bdev = dif->bdev; in erofs_map_dev()
187 map->m_daxdev = dif->dax_dev; in erofs_map_dev()
200 struct erofs_map_blocks map; in erofs_iomap_begin() local
203 map.m_la = offset; in erofs_iomap_begin()
204 map.m_llen = length; in erofs_iomap_begin()
206 ret = erofs_map_blocks(inode, &map, EROFS_GET_BLOCKS_RAW); in erofs_iomap_begin()
211 .m_deviceid = map.m_deviceid, in erofs_iomap_begin()
212 .m_pa = map.m_pa, in erofs_iomap_begin()
220 iomap->offset = map.m_la; in erofs_iomap_begin()
221 iomap->length = map.m_llen; in erofs_iomap_begin()
225 if (!(map.m_flags & EROFS_MAP_MAPPED)) { in erofs_iomap_begin()
233 if (map.m_flags & EROFS_MAP_META) { in erofs_iomap_begin()